Add missing file

This commit is contained in:
Jackson Harper
2024-11-01 00:40:00 +08:00
parent 90ec769f05
commit 97b392aff6

View File

@ -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 && (
<HStack
css={{
p: '5px',
top: 0,
left: 0,
width: '100vw',
position: 'absolute',
bg: '#FF5733',
color: '#FFFFFF',
zIndex: '100',
font: '$inter',
gap: '10px',
}}
alignment="start"
distribution="center"
>
Omnivore is shutting down on Nov. 30th.
<a
href="https://blog.omnivore.app/p/details-on-omnivore-shutting-down"
target="_blank"
rel="noreferrer"
>
Read More
</a>
<SpanBox css={{ width: '50px' }} />
<CloseButton
close={() => {
setShowMaintenanceMode(false)
}}
/>
</HStack>
)}
</>
)
}