From 6c2ebb5f550bf783bbdca6bae37c50e77e087a17 Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Tue, 19 Nov 2024 17:53:43 -0700 Subject: [PATCH] feat: incident announcement --- NOTES.md | 1 + web/src/components/Announcement/Announcement.tsx | 9 +++++++++ web/src/layouts/BaseLayout/BaseLayout.tsx | 8 ++++++++ 3 files changed, 18 insertions(+) create mode 100644 web/src/components/Announcement/Announcement.tsx diff --git a/NOTES.md b/NOTES.md index 9bf11e7..cd2c062 100644 --- a/NOTES.md +++ b/NOTES.md @@ -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 diff --git a/web/src/components/Announcement/Announcement.tsx b/web/src/components/Announcement/Announcement.tsx new file mode 100644 index 0000000..d3e1aa4 --- /dev/null +++ b/web/src/components/Announcement/Announcement.tsx @@ -0,0 +1,9 @@ +export type Props = { + msg: string +} + +const Announcement = ({ msg }: Props) => { + return
{msg}
+} + +export default Announcement diff --git a/web/src/layouts/BaseLayout/BaseLayout.tsx b/web/src/layouts/BaseLayout/BaseLayout.tsx index abd0b6f..f0ab10b 100644 --- a/web/src/layouts/BaseLayout/BaseLayout.tsx +++ b/web/src/layouts/BaseLayout/BaseLayout.tsx @@ -1,3 +1,4 @@ +import Announcement from 'src/components/Announcement/Announcement' import { prerenderSafe } from 'src/logic/prerender' import { Footer } from './Footer' @@ -7,6 +8,12 @@ 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()) @@ -14,6 +21,7 @@ const BaseLayout = ({ children }: BaseLayoutProps) => { <>
+ {children}