From 98968341660e8655cbb0eac2ca6f8a759b1651f0 Mon Sep 17 00:00:00 2001 From: Anders Rognstad Date: Wed, 27 Nov 2024 12:28:11 +0100 Subject: [PATCH] IS-2795: Show sok if toggle enabled --- src/components/toolbar/ToolbarWrapper.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/toolbar/ToolbarWrapper.tsx b/src/components/toolbar/ToolbarWrapper.tsx index dbb7304e..e1da4820 100644 --- a/src/components/toolbar/ToolbarWrapper.tsx +++ b/src/components/toolbar/ToolbarWrapper.tsx @@ -3,6 +3,7 @@ import Toolbar from './Toolbar'; import { Label } from '@navikt/ds-react'; import { PAGINATED_NUMBER_OF_ITEMS } from '@/components/toolbar/PaginationContainer'; import SokPerson from '@/components/sokperson/SokPerson'; +import { useFeatureToggles } from '@/data/unleash/unleashQueryHooks'; export interface ToolbarWrapperProps { alleMarkert: boolean; @@ -36,6 +37,7 @@ const ToolbarWrapper = (props: ToolbarWrapperProps): ReactElement => { firstVisibleIndex: 0, lastVisibleIndex: PAGINATED_NUMBER_OF_ITEMS, }); + const { toggles } = useFeatureToggles(); return ( <> @@ -50,7 +52,7 @@ const ToolbarWrapper = (props: ToolbarWrapperProps): ReactElement => { )} - + {toggles.isSokEnabled && }