From 85dee9acef804ffd662dfc592ce127215371f715 Mon Sep 17 00:00:00 2001 From: Stefan O'Connell Date: Tue, 11 Jul 2023 12:54:17 -0300 Subject: [PATCH 1/3] Tweaked alerts so pages is optional --- src/components/AlertBlock.tsx | 4 ++-- src/components/Layout.tsx | 2 +- src/lib/types.ts | 5 ++--- src/lib/useAlerts.ts | 5 ++++- src/pages/api/alerts.ts | 41 ++++++++++++++++++++--------------- 5 files changed, 33 insertions(+), 24 deletions(-) diff --git a/src/components/AlertBlock.tsx b/src/components/AlertBlock.tsx index 68986c6fe..4c474ba95 100644 --- a/src/components/AlertBlock.tsx +++ b/src/components/AlertBlock.tsx @@ -8,7 +8,7 @@ import AlertSection from './AlertSection' import MarkdownContent from './MarkdownContent' export interface AlertBlockProps { - page: AlertPage + page?: AlertPage className?: string } @@ -23,7 +23,7 @@ const AlertBlock: FC = ({ page, className }) => { ) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index c5d2f0d64..07d658dc5 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -24,7 +24,7 @@ const Layout: FC = ({ children }) => { id="mainContent" className="container mx-auto mt-5 flex-1 px-4 pb-8" > - + {children}