From 0f0a680af3e5f6ff17a10d5b9cac03779aaca710 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Mon, 22 Jul 2024 11:03:10 +0200 Subject: [PATCH] chore: don't ask OSS users to reach out to CS (#7633) The limit card says to contact cs@getunleash if you're at the limits, but we probably don't want to show that to OSS customers (it's not terrible, just not very helpful), so let's hide it for OSS. Instead, we'll ask them to try the community slack. Screenie: ![image](https://github.com/user-attachments/assets/5a5dc292-3878-4181-98ac-f1ce4583d8a3) --- frontend/src/component/common/Limit/Limit.tsx | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) 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 - -
+ ); };