Skip to content

Commit

Permalink
hides split modal behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgnlez committed Jan 15, 2024
1 parent 5fd3bb0 commit 21955bf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { useQueryClient } from 'react-query';

import { useRouter } from 'next/router';

import { useFeatureFlags } from 'hooks/feature-flags';

import Icon from 'components/icon';
import Modal from 'components/modal/component';
import EditModal from 'layout/project/sidebar/project/inventory-panel/features/modals/edit';
Expand Down Expand Up @@ -35,6 +37,7 @@ const ActionsMenu = ({
const queryClient = useQueryClient();
const isDeletable = item.isCustom;
const isSplittable = Boolean(item.splitOptions?.length);
const { split } = useFeatureFlags();

const [modalState, setModalState] = useState<{ edit: boolean; split: boolean }>({
edit: false,
Expand Down Expand Up @@ -83,7 +86,7 @@ const ActionsMenu = ({
<EditModal featureId={item.id} handleModal={handleModal} onDone={onDoneEditing} />
</Modal>
</li>
{isSplittable && (
{isSplittable && split && (
<li>
<button
type="button"
Expand Down

0 comments on commit 21955bf

Please sign in to comment.