Skip to content

Commit

Permalink
Ny måte å bruke feature toggle context på
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashwi committed Jan 7, 2025
1 parent 6b84f24 commit f12619b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/behandling-pleiepenger/src/components/Uttak.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useContext } from 'react';
import aksjonspunktCodes from '@fpsak-frontend/kodeverk/src/aksjonspunktCodes';
import aksjonspunktStatus from '@fpsak-frontend/kodeverk/src/aksjonspunktStatus';
import { findEndpointsFromRels, httpErrorHandler } from '@fpsak-frontend/utils';
Expand All @@ -9,7 +10,7 @@ import VurderOverlappendeSakIndex from '@k9-sak-web/gui/prosess/uttak/vurder-ove
import { OverstyringUttakRequest } from '../types';
import { konverterKodeverkTilKode } from '@k9-sak-web/lib/kodeverk/konverterKodeverkTilKode.js';
import { VStack } from '@navikt/ds-react';
import { useFeatureToggles } from '@k9-sak-web/gui/utils/featureToggles/useFeatureToggles.js';
import FeatureTogglesContext from '@k9-sak-web/gui/utils/featureToggles/FeatureTogglesContext.js';

interface UttakProps {
uuid: string;
Expand Down Expand Up @@ -46,7 +47,7 @@ export default ({
erOverstyrer,
readOnly,
}: UttakProps) => {
const { featureToggles } = useFeatureToggles();
const featureToggles = useContext(FeatureTogglesContext);
const { versjon, links, status: behandlingStatus } = behandling;
const { addErrorMessage } = useRestApiErrorDispatcher();
const httpErrorHandlerCaller = (status: number, locationHeader?: string) =>
Expand Down

0 comments on commit f12619b

Please sign in to comment.