From 4ca429e3b651c5e355f93a8ce7f08f171994fed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ivind=20Stensrud?= Date: Wed, 10 Apr 2024 14:58:32 +0200 Subject: [PATCH] :bug: URL til uinnlogget mine-aap var feil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uinnlogget demo-søknad hadde feil lenke til mine-aap --- .../standard/Kvittering/Kvittering.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/components/pageComponents/standard/Kvittering/Kvittering.tsx b/components/pageComponents/standard/Kvittering/Kvittering.tsx index 8a3cf012..9630b31f 100644 --- a/components/pageComponents/standard/Kvittering/Kvittering.tsx +++ b/components/pageComponents/standard/Kvittering/Kvittering.tsx @@ -3,7 +3,7 @@ import React from 'react'; import * as classes from './Kvittering.module.css'; import { KontaktInfoView, SøkerView } from 'context/sokerOppslagContext'; import { SuccessStroke } from '@navikt/ds-icons'; -import { clientSideIsProd } from 'utils/environments'; +import { clientSideIsProd, isFunctionalTest } from 'utils/environments'; import { FormattedMessage, useIntl } from 'react-intl'; interface StudentProps { @@ -14,9 +14,16 @@ interface StudentProps { const Kvittering = ({ søker, kontaktinformasjon }: StudentProps) => { const { formatMessage } = useIntl(); - const mineAapUrl = clientSideIsProd() - ? 'https://nav.no/aap/mine-aap' - : 'https://aap-mine-aap.intern.dev.nav.no/aap/mine-aap'; + const mineAapUrl = () => { + if (clientSideIsProd()) { + return 'https://nav.no/aap/mine-aap'; + } + if (isFunctionalTest()) { + return process.env.NEXT_PUBLIC_MINE_AAP_URL; + } + return 'https://aap-mine-aap.intern.dev.nav.no/aap/mine-aap'; + }; + const dittNavUrl = clientSideIsProd() ? 'https://www.nav.no/person/dittnav/' : 'https://www.dev.nav.no/person/dittnav/'; @@ -85,7 +92,7 @@ const Kvittering = ({ søker, kontaktinformasjon }: StudentProps) => { )}
-