Skip to content

Commit

Permalink
IS-2986: Fjernet bruk av toggle for søk etter sykmeldt slik at elemen…
Browse files Browse the repository at this point in the history
…tet ikke flimrer ved innlasting (#565)
  • Loading branch information
mariusfoss authored Jan 9, 2025
1 parent 5d131f1 commit ccdc8a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion server/unleash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ export function getToggles(veilederId: any, enhetId: any) {
};
return {
isFlexjarArenaEnabled: unleash.isEnabled('isFlexjarArenaEnabled', context),
isSokEnabled: unleash.isEnabled('isSokEnabled', context),
};
}
14 changes: 5 additions & 9 deletions src/components/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { ReactElement } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import { MoteoversiktLink } from '@/components/MoteoversiktLink';
import { Box, Heading, HStack, Tabs } from '@navikt/ds-react';
import { useFeatureToggles } from '@/data/unleash/unleashQueryHooks';
import { MagnifyingGlassIcon } from '@navikt/aksel-icons';
import { routes } from '@/routers/routes';

Expand All @@ -13,7 +12,6 @@ const texts = {
};

export const NavigationBar = (): ReactElement => {
const { toggles } = useFeatureToggles();
const navigate = useNavigate();
const { pathname } = useLocation();

Expand All @@ -30,13 +28,11 @@ export const NavigationBar = (): ReactElement => {
value={routes.ENHET_OVERSIKT}
label={<Heading size="small">{texts.enhetensOversikt}</Heading>}
/>
{toggles.isSokEnabled && (
<Tabs.Tab
value={routes.SOK_SYKMELDT}
icon={<MagnifyingGlassIcon />}
label={<Heading size="small">{texts.sokSykmeldt}</Heading>}
/>
)}
<Tabs.Tab
value={routes.SOK_SYKMELDT}
icon={<MagnifyingGlassIcon />}
label={<Heading size="small">{texts.sokSykmeldt}</Heading>}
/>
</Tabs.List>
</Tabs>
<div className="ml-auto self-center">
Expand Down
2 changes: 0 additions & 2 deletions src/data/unleash/types/unleash_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ export type Toggles = {
// See toggles: https://teamsykefravr-unleash-web.nav.cloud.nais.io/features
export enum ToggleNames {
isFlexjarArenaEnabled = 'isFlexjarArenaEnabled',
isSokEnabled = 'isSokEnabled',
}

export const defaultToggles: Toggles = {
isFlexjarArenaEnabled: false,
isSokEnabled: false,
};

0 comments on commit ccdc8a6

Please sign in to comment.