From d306fc86cb0549103395b5bdd3e3a479e0aa574e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Gonz=C3=A1lez=20Mu=C3=B1oz?= Date: Thu, 14 Dec 2023 09:08:30 +0100 Subject: [PATCH] enables permanently feature splitting and CSV upload --- app/README.md | 2 -- .../features/selected-item/component.tsx | 8 +++--- app/components/upload-tabs/index.tsx | 28 ++++++++----------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/app/README.md b/app/README.md index bd85f36497..09d38c50b4 100644 --- a/app/README.md +++ b/app/README.md @@ -21,8 +21,6 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with - `NEXT_PUBLIC_FEATURE_FLAGS` (comma-separated list of feature flag strings, optional, default is an empty list): list features here in order to _enable_ them in the frontend app; features available behind feature flags are: - - `split`: make _split_ functionality available for conservation features in - the frontend app - `strat`: make _stratification_ functionality available for conservation features in the frontend app diff --git a/app/components/features/selected-item/component.tsx b/app/components/features/selected-item/component.tsx index 3c8558eeef..e69d6226a6 100644 --- a/app/components/features/selected-item/component.tsx +++ b/app/components/features/selected-item/component.tsx @@ -83,7 +83,7 @@ export const Item: React.FC = ({ }: ItemProps) => { const [splitOpen, setSplitOpen] = useState(!!splitSelected); - const { split, strat } = useFeatureFlags(); + const { strat } = useFeatureFlags(); // EVENTS const onSplitChanged = useCallback( @@ -137,7 +137,7 @@ export const Item: React.FC = ({

{name}

- {editable && split && !!OPTIONS.length && ( + {editable && !!OPTIONS.length && ( = ({
- {split && splitOpen && ( + {splitOpen && (

@@ -299,7 +299,7 @@ export const Item: React.FC = ({ )} - {splitSelected && split && splitOpen && ( + {splitSelected && splitOpen && (
    {splitFeaturesOptions.map((f) => { const checked = diff --git a/app/components/upload-tabs/index.tsx b/app/components/upload-tabs/index.tsx index 58e7c323a3..5c91e2556f 100644 --- a/app/components/upload-tabs/index.tsx +++ b/app/components/upload-tabs/index.tsx @@ -1,7 +1,5 @@ import React from 'react'; -import { useFeatureFlags } from 'hooks/feature-flags'; - import { cn } from 'utils/cn'; const BUTTON_COMMON_CLASSES = @@ -18,8 +16,6 @@ export const UploadFeatureTabs = ({ mode: UploadFeatureMode; onChange: (mode: UploadFeatureMode) => void; }): JSX.Element => { - const { CSVUpload } = useFeatureFlags(); - return (
    - )} +
    ); };