Skip to content

Commit

Permalink
Legg til mer på typing på window
Browse files Browse the repository at this point in the history
  • Loading branch information
tu55eladd committed Dec 20, 2024
1 parent c47eec8 commit 4d9f461
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sentry2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import {
} from 'react-router-dom';
import { captureConsoleIntegration } from '@sentry/react';

export enum Env {
enum Env {
Local = 'local',
Dev = 'dev',
Prod = 'prod'
}

export const getEnv = (): Env => {
const getEnv = (): Env => {
// TODO: Dette vil ikke virke som internflate
const { hostname } = window.location;
if (hostname.includes('dev.nav.no')) return Env.Dev;
Expand Down Expand Up @@ -66,6 +66,7 @@ Sentry.init({
});

declare const window: {
location: { hostname: string };
captureException: typeof Sentry.captureException;
captureMessage: typeof Sentry.captureMessage;
};
Expand Down

0 comments on commit 4d9f461

Please sign in to comment.