mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Feature restoration ## What is the current behavior? Incident banners cannot be dismissed by users. ## What is the new behavior? Users can dismiss incident banners again. ## Additional context
28 lines
688 B
TypeScript
28 lines
688 B
TypeScript
import { HeaderBanner } from '@/components/interfaces/Organization/HeaderBanner'
|
|
import { InlineLink } from '@/components/ui/InlineLink'
|
|
import { useStatusPageBannerVisibility } from './useStatusPageBannerVisibility'
|
|
|
|
const BANNER_DESCRIPTION = (
|
|
<>
|
|
Follow the <InlineLink href="https://status.supabase.com">status page</InlineLink> for updates
|
|
</>
|
|
)
|
|
|
|
/**
|
|
* Used to display ongoing incidents
|
|
*/
|
|
export const StatusPageBanner = () => {
|
|
const banner = useStatusPageBannerVisibility()
|
|
|
|
if (!banner) return null
|
|
|
|
return (
|
|
<HeaderBanner
|
|
variant="warning"
|
|
title={banner.title}
|
|
description={BANNER_DESCRIPTION}
|
|
onDismiss={banner.dismiss}
|
|
/>
|
|
)
|
|
}
|