From 36f8d88f189f4795b9461da1da332f828d2ef5a4 Mon Sep 17 00:00:00 2001 From: sigurdgroneng Date: Tue, 15 Aug 2023 10:53:40 +0200 Subject: [PATCH] =?UTF-8?q?Always=20=C3=B8ink=20to=20dialog=20with=20fnr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Provider.tsx | 2 +- .../hjelpekomponenter/SendEnMeldingKnapp.tsx | 7 ++++--- src/moduler/dialog/DialogFlateUtils.ts | 14 +++++++------- src/moduler/dialog/DialogLink.tsx | 11 ++++++++--- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/Provider.tsx b/src/Provider.tsx index e72523cd3..6f00f6a11 100644 --- a/src/Provider.tsx +++ b/src/Provider.tsx @@ -3,9 +3,9 @@ import { DndProvider } from 'react-dnd'; import { HTML5Backend } from 'react-dnd-html5-backend'; import { Provider as ReduxProvider } from 'react-redux'; +import { ER_INTERN_FLATE } from './constant'; import FeatureToggle from './moduler/feature/FeatureToggle'; import createStore from './store'; -import { ER_INTERN_FLATE } from './constant'; interface Props { children: React.ReactNode; diff --git a/src/moduler/aktivitet/visning/hjelpekomponenter/SendEnMeldingKnapp.tsx b/src/moduler/aktivitet/visning/hjelpekomponenter/SendEnMeldingKnapp.tsx index c558dc1ce..26f8b34c7 100644 --- a/src/moduler/aktivitet/visning/hjelpekomponenter/SendEnMeldingKnapp.tsx +++ b/src/moduler/aktivitet/visning/hjelpekomponenter/SendEnMeldingKnapp.tsx @@ -5,9 +5,9 @@ import { useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; import { AlleAktiviteter } from '../../../../datatypes/aktivitetTypes'; -import { useErVeileder } from '../../../../Provider'; -import { selectDialogForAktivitetId } from '../../../dialog/dialog-selector'; +import { useErVeileder, useFnr } from '../../../../Provider'; import { useRoutes } from '../../../../routes'; +import { selectDialogForAktivitetId } from '../../../dialog/dialog-selector'; import { byttTilDialogFlate, getDialogLenke } from '../../../dialog/DialogFlateUtils'; interface Props { @@ -16,6 +16,7 @@ interface Props { const SendEnMeldingKnapp = (props: Props) => { const { aktivitet } = props; + const fnr = useFnr(); const erVeileder = useErVeileder(); const dialog = useSelector(selectDialogForAktivitetId(aktivitet.id)); @@ -38,7 +39,7 @@ const SendEnMeldingKnapp = (props: Props) => {