Skip to content

Commit

Permalink
update info banner
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonjetz committed Jul 15, 2024
1 parent 06cd80b commit 468029e
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions src/InfoBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import Alert from 'react-bootstrap/Alert'
import './Header.css'
import { Container } from 'react-bootstrap'
import { set as setCookie, get as getCookie } from 'es-cookie'
import ExternalLink from 'common/ExternalLink'

function InfoBanner(): JSX.Element | null {
const initialState = getCookie('eblShowInfoBanner') !== 'false'
const key = 'eblShowUpdateBanner'
const initialState = getCookie(key) !== 'false'
const [show, setShow] = useState(initialState)

const midnight = new Date()
Expand All @@ -14,20 +16,29 @@ function InfoBanner(): JSX.Element | null {
return show ? (
<Container fluid className="Header__info-banner">
<Alert
variant="warning"
variant="primary"
onClose={() => {
setShow(false)
setCookie('eblShowInfoBanner', 'false', { expires: midnight })
setCookie(key, 'false', { expires: midnight })
}}
dismissible
>
<strong>Scheduled Maintenance Notice:</strong> On{' '}
<strong>Monday, July 15, 2024, from 10:00 AM to 12:00 PM CEST</strong>,
the eBL servers will be undergoing scheduled maintenance. During this
time, you will not be able to log in or make any changes to records. The
maintenance may also cause temporary service interruptions. Registered
users will receive an email notification once the maintenance is
complete.
<strong>Update:</strong> On Monday, July 15, the eBL servers were
successfully migrated to new infrastructure. From now on, eBL can be
accessed either from{' '}
<ExternalLink href="https://www.ebl.lmu.de">
https://www.ebl.lmu.de
</ExternalLink>{' '}
or{' '}
<ExternalLink href="https://www.ebl.badw.de">
https://www.ebl.badw.de
</ExternalLink>
. Please note that it will not be possible to login at www.ebl.lmu.de
until July 16, but you can already access eBL via the new url at
<ExternalLink href="https://www.ebl.badw.de">
https://www.ebl.badw.de
</ExternalLink>
.
</Alert>
</Container>
) : null
Expand Down

0 comments on commit 468029e

Please sign in to comment.