Skip to content

Commit

Permalink
feat: incident announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
mplewis committed Nov 20, 2024
1 parent dec77fc commit 6c2ebb5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- [ ] Consensually gather user emails for mailing list
- [ ] Add pretty error messages for 404s (e.g. clicked an expired/tidied link)
- [ ] Redirect old slugs on slug change
- [ ] Site-wide announcement feature
- [x] Hold RSVP locally with cookie
- [x] **Scheduler engine**
- [x] Send reminders
Expand Down
9 changes: 9 additions & 0 deletions web/src/components/Announcement/Announcement.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export type Props = {
msg: string
}

const Announcement = ({ msg }: Props) => {
return <div className="notification is-info">{msg}</div>
}

export default Announcement
8 changes: 8 additions & 0 deletions web/src/layouts/BaseLayout/BaseLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Announcement from 'src/components/Announcement/Announcement'
import { prerenderSafe } from 'src/logic/prerender'

import { Footer } from './Footer'
Expand All @@ -7,13 +8,20 @@ type BaseLayoutProps = {
children?: React.ReactNode
}

const currentAnnouncement =
'We are currently encountering issues with our email provider. ' +
'New events and RSVPs are impacted, ' +
'but any email links you already have will still work. ' +
"We're working to resolve the issue ASAP. Thank you for your patience!"

const BaseLayout = ({ children }: BaseLayoutProps) => {
prerenderSafe(() => registerBurger())

return (
<>
<div className="is-max-desktop container px-4 pb-4">
<Navbar />
<Announcement msg={currentAnnouncement} />
{children}
<Footer />
</div>
Expand Down

0 comments on commit 6c2ebb5

Please sign in to comment.