Skip to content

Commit

Permalink
Prøv isPending i stedet for isLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
almyy committed Dec 10, 2024
1 parent 724352a commit c7a0303
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Tilgangskontrollside/Tilgangskontrollside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ const Tilgangskontrollside: React.FC<TilgangskontrollsideProps> = ({children, qu
const router = useRouter();
const {t} = useTranslation();
const sessionQuery = useDekoratorLogin();
const {error, isLoading, data: harTilgangData} = useHarTilgang();
const {error, isPending, data: harTilgangData} = useHarTilgang();

console.log("sessionQuery.isLoading: ", sessionQuery.isLoading);
console.log("sessionQuery.isLoading: ", sessionQuery.isPending);
console.log("sessionQuery.error: ", sessionQuery.error);
console.log("harTilgang.error: ", error);
console.log("harTilgang.isLoading", isLoading);
console.log("harTilgang.isLoading", isPending);
console.log("harTilgang.data", harTilgangData);
useEffect(() => {
if (
Expand All @@ -64,7 +64,7 @@ const Tilgangskontrollside: React.FC<TilgangskontrollsideProps> = ({children, qu
}
}, [sessionQuery.data, sessionQuery.isPending, router]);

if (sessionQuery.isLoading || isLoading) {
if (sessionQuery.isPending || isPending) {
return (
<div className="informasjon-side">
{!router.pathname.includes("/utbetaling") && <Banner>{t("app.tittel")}</Banner>}
Expand Down

0 comments on commit c7a0303

Please sign in to comment.