Skip to content

Commit

Permalink
Prøver å fikse tilgangskontroll
Browse files Browse the repository at this point in the history
  • Loading branch information
almyy committed Dec 10, 2024
1 parent 98f9c24 commit 133fcdd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/403.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Wrapper = styled.div`
const Forbidden = (): React.JSX.Element => {
const {t} = useTranslation();
const router = useRouter();
const {data, isLoading, error} = useHarTilgang();
const {data, isLoading} = useHarTilgang();
if (isLoading) {
return (
<div className="informasjon-side">
Expand All @@ -35,9 +35,9 @@ const Forbidden = (): React.JSX.Element => {
);
}

if (!data?.harTilgang) {
if (!data?.data.harTilgang) {
logger.info(
data?.fornavn ? "Viser tilgangskontrollside med fornavn" : "Viser tilgangskontrollside uten fornavn"
data?.data.fornavn ? "Viser tilgangskontrollside med fornavn" : "Viser tilgangskontrollside uten fornavn"
);
}

Expand All @@ -51,7 +51,7 @@ const Forbidden = (): React.JSX.Element => {
</StyledElla>
<Heading as="p" size="large" spacing>
{t("tilgang.header", {
fornavn: data?.fornavn,
fornavn: data?.data.fornavn,
})}
</Heading>
<BodyLong spacing>{t("tilgang.info")}</BodyLong>
Expand Down

0 comments on commit 133fcdd

Please sign in to comment.