From 78db14eaea744ab9183713f306b491d173bc7fdb Mon Sep 17 00:00:00 2001 From: Martin Almvik Date: Tue, 10 Dec 2024 10:28:32 +0100 Subject: [PATCH] =?UTF-8?q?Pr=C3=B8v=20=C3=A5=20chaine=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tilgangskontrollside/Tilgangskontrollside.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Tilgangskontrollside/Tilgangskontrollside.tsx b/src/components/Tilgangskontrollside/Tilgangskontrollside.tsx index 77fc6bcd..2e5c528a 100644 --- a/src/components/Tilgangskontrollside/Tilgangskontrollside.tsx +++ b/src/components/Tilgangskontrollside/Tilgangskontrollside.tsx @@ -48,7 +48,11 @@ const Tilgangskontrollside: React.FC = ({children, qu const router = useRouter(); const {t} = useTranslation(); const sessionQuery = useDekoratorLogin(); - const {error, isPending, data: harTilgangData} = useHarTilgang(); + const { + error, + isPending, + data: harTilgangData, + } = useHarTilgang({query: {enabled: sessionQuery.status === "success"}}); console.log("sessionQuery.isLoading: ", sessionQuery.isPending); console.log("sessionQuery.error: ", sessionQuery.error);