From 7dcc0513f3c8065bf0be0d0a72469a4a941d7272 Mon Sep 17 00:00:00 2001 From: Justin Sherrill Date: Wed, 20 Nov 2024 14:05:15 -0500 Subject: [PATCH] Fixes 5035: enable uploads in prod preview --- .../components/AddContent/AddContent.test.tsx | 2 +- .../ContentListTable/components/AddContent/AddContent.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.test.tsx b/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.test.tsx index 169e645b..099747c1 100644 --- a/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.test.tsx +++ b/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.test.tsx @@ -62,7 +62,7 @@ jest.mock('../../ContentListTable', () => ({ })); jest.mock('@redhat-cloud-services/frontend-components/useChrome', () => () => ({ - isProd: () => false, + isProd: () => false, isBeta: () => false })); const passingValidationMetaDataSigNotPresent = [ diff --git a/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.tsx b/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.tsx index a44b6deb..9117dc9d 100644 --- a/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.tsx +++ b/src/Pages/Repositories/ContentListTable/components/AddContent/AddContent.tsx @@ -100,8 +100,9 @@ const AddContent = ({ isEdit = false }: Props) => { const { repoUUID: uuid } = useParams(); const navigate = useNavigate(); const rootPath = useRootPath(); - const { isProd } = useChrome(); + const { isProd, isBeta } = useChrome(); const isInProd = useMemo(() => isProd(), []); + const isInBeta = useMemo(() => isBeta(), []); const [errors, setErrors] = useState>({}); const { data, isLoading: isLoadingInitialContent, isSuccess } = useFetchContent(uuid!, isEdit); @@ -492,7 +493,7 @@ const AddContent = ({ isEdit = false }: Props) => { } /> - +