From 97b392aff6c849dd47b4941979659fe16563abec Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 1 Nov 2024 00:40:00 +0800 Subject: [PATCH] Add missing file --- .../components/elements/ShutdownBanner.tsx | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 packages/web/components/elements/ShutdownBanner.tsx diff --git a/packages/web/components/elements/ShutdownBanner.tsx b/packages/web/components/elements/ShutdownBanner.tsx new file mode 100644 index 000000000..ea7f3ea2e --- /dev/null +++ b/packages/web/components/elements/ShutdownBanner.tsx @@ -0,0 +1,52 @@ +import { usePersistedState } from '../../lib/hooks/usePersistedState' +import { CloseButton } from './CloseButton' +import { HStack, SpanBox } from './LayoutPrimitives' + +export const ShutdownBanner = () => { + const [ + showMaintenanceMode, + setShowMaintenanceMode, + isLoadingShowMaintenanceMode, + ] = usePersistedState({ + key: 'show-shutdown-mode', + isSessionStorage: true, + initialValue: true, + }) + return ( + <> + {!isLoadingShowMaintenanceMode && showMaintenanceMode && ( + + Omnivore is shutting down on Nov. 30th. + + Read More + + + { + setShowMaintenanceMode(false) + }} + /> + + )} + + ) +}