Skip to content

Commit

Permalink
Show downtime modal and block UI
Browse files Browse the repository at this point in the history
  • Loading branch information
cskrov committed Nov 2, 2023
1 parent da54c55 commit 3aea797
Showing 1 changed file with 26 additions and 31 deletions.
57 changes: 26 additions & 31 deletions frontend/src/routes/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Alert, BodyShort, Heading } from '@navikt/ds-react';
import { Alert, BodyShort, Heading, Modal } from '@navikt/ds-react';
import { ErrorBoundary, withSentryReactRouterV6Routing } from '@sentry/react';
import React from 'react';
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
Expand Down Expand Up @@ -37,36 +37,31 @@ const SentryRoutes = withSentryReactRouterV6Routing(Routes);

export const Router = () => (
<BrowserRouter>
<div
style={{
display: 'flex',
justifyContent: 'center',
backgroundColor: '#f1f1f1',
paddingTop: 32,
paddingBottom: 32,
}}
>
<Alert variant="warning" size="medium">
<Heading level="1" size="small">
Teknisk vedlikehold / <i>Technical maintenance</i>
</Heading>
<BodyShort spacing>
Det vil ikke være mulig å opprette, endre eller sende inn klager, anker og ettersendelser torsdag{' '}
<strong>02.11.2023</strong> mellom kl. <strong>19:00</strong> og <strong>20:00</strong>.
</BodyShort>
<BodyShort spacing>
Hvis du er logget inn, vil alle påbegynte klager og anker forbli lagret og kan fullføres etter vedlikeholdet.
</BodyShort>
<BodyShort spacing style={{ fontStyle: 'italic' }}>
It will not be possible to create, edit or submit complaints, appeals and additional documentation Thursday{' '}
<strong>02.11.2023</strong> between <strong>19:00</strong> and <strong>20:00</strong>.
</BodyShort>
<BodyShort spacing style={{ fontStyle: 'italic' }}>
If you are logged in, all unfinished complaints and appeals will remain saved and can be completed after
maintenance.
</BodyShort>
</Alert>
</div>
<Modal open onBeforeClose={() => false}>
<Modal.Body>
<Alert variant="warning" size="medium">
<Heading level="1" size="small">
Teknisk vedlikehold / <i>Technical maintenance</i>
</Heading>
<BodyShort spacing>
Det vil ikke være mulig å opprette, endre eller sende inn klager, anker og ettersendelser torsdag{' '}
<strong>02.11.2023</strong> mellom kl. <strong>19:00</strong> og <strong>20:00</strong>.
</BodyShort>
<BodyShort spacing>
Hvis du er logget inn, vil alle påbegynte klager og anker forbli lagret og kan fullføres etter
vedlikeholdet.
</BodyShort>
<BodyShort spacing style={{ fontStyle: 'italic' }}>
It will not be possible to create, edit or submit complaints, appeals and additional documentation Thursday{' '}
<strong>02.11.2023</strong> between <strong>19:00</strong> and <strong>20:00</strong>.
</BodyShort>
<BodyShort spacing style={{ fontStyle: 'italic' }}>
If you are logged in, all unfinished complaints and appeals will remain saved and can be completed after
maintenance.
</BodyShort>
</Alert>
</Modal.Body>
</Modal>
<NavigationLogger>
<DekoratorSetRedirect>
<LanguageComponent>
Expand Down

0 comments on commit 3aea797

Please sign in to comment.