diff --git a/frontend/src/component/common/Limit/Limit.tsx b/frontend/src/component/common/Limit/Limit.tsx index 9b9c894780..714c0db2bb 100644 --- a/frontend/src/component/common/Limit/Limit.tsx +++ b/frontend/src/component/common/Limit/Limit.tsx @@ -6,6 +6,7 @@ import ErrorIcon from '@mui/icons-material/Cancel'; import CloseIcon from '@mui/icons-material/Close'; import type { FC } from 'react'; import { ConditionallyRender } from '../ConditionallyRender/ConditionallyRender'; +import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; const StyledBox = styled(Box)(({ theme }) => ({ display: 'flex', @@ -70,6 +71,7 @@ export const Limit: FC<{ onClose?: () => void; className?: string; }> = ({ name, shortName, limit, currentValue, onClose, className }) => { + const { isOss } = useUiConfig(); const percentageLimit = Math.floor((currentValue / limit) * 100); const belowLimit = currentValue < limit; const threshold = 80; @@ -78,6 +80,21 @@ export const Limit: FC<{ return null; } + const footerContent = isOss() ? ( + <> + Need help with resource limits? Try the the{' '} + Unleash community Slack. + + ) : ( + <> + If you need more than {limit} {shortName ?? name}, + please reach out to us at{' '} + + cs@getunleash.io + + + ); + return (
@@ -135,13 +152,7 @@ export const Limit: FC<{ Limit: {limit} -
- If you need more than {limit}{' '} - {shortName ?? name}, please reach out to us at{' '} - - cs@getunleash.io - -
+ ); };