Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #477 from navikt/test-versjon-banner
Browse files Browse the repository at this point in the history
Testversjonbanner
  • Loading branch information
sstensby authored Aug 18, 2023
2 parents 5ae77c5 + 87ace59 commit 9ea6fc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions server/src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,22 @@ export function getFrontendEnvs() {

let shape: {
GRAFANA_AGENT_COLLECTOR_URL: ZodString | ZodOptional<ZodString>;
PROD_URL: ZodString | ZodOptional<ZodString>;
MIN_SIDE_ARBEIDSGIVER_URL: ZodString;
MILJO: ZodEffects<ZodString>;
} = {
MILJO: z.string().refine(isMiljø),
MIN_SIDE_ARBEIDSGIVER_URL: z.string().url(),
GRAFANA_AGENT_COLLECTOR_URL: z.string().url(),
PROD_URL: z.string().url().optional(),
};

if (miljø.MILJO === MILJØ.DEV_EKSTERN) {
shape = {
MILJO: z.string().refine(isMiljø),
MIN_SIDE_ARBEIDSGIVER_URL: z.string().url(),
GRAFANA_AGENT_COLLECTOR_URL: z.string().url().optional(),
PROD_URL: z.string().url().optional(),
};
}

Expand All @@ -56,6 +59,7 @@ export function getFrontendEnvs() {
MIN_SIDE_ARBEIDSGIVER_URL:
'https://arbeidsgiver.ekstern.dev.nav.no/min-side-arbeidsgiver',
GRAFANA_AGENT_COLLECTOR_URL: 'https://telemetry.ekstern.dev.nav.no/collect',
PROD_URL: 'https://arbeidsgiver.nav.no/sykefravarsstatistikk',
};
}
logger.error('Failed to parse frontend envs', err);
Expand Down
2 changes: 1 addition & 1 deletion src/Banner/TestVersjonBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const TestVersjonBanner = () => {
Dette er en testversjon
</Heading>
<BodyShort>
Her kan du bli bedre kjent med samtalestøtte for arbeidsgiver.
Her kan du bli bedre kjent med sykefraværsstatistikken.
{prodUrl?.length ? (
<Link href={prodUrl}>Klikk her for å gå til den vanlige siden.</Link>
) : null}
Expand Down

0 comments on commit 9ea6fc6

Please sign in to comment.