chore: Add support to enable incident banner through env var (#41109)

* Show the incident banner since configcat is down.

* Enable the ongoing incident through an env var.

* Rename the env var to be available on FE.
This commit is contained in:
Ivan Vasilov
2025-12-05 16:27:58 +02:00
committed by GitHub
parent 0e861a24fc
commit 19b6a419a9
3 changed files with 6 additions and 6 deletions

View File

@@ -2,12 +2,13 @@ import { PropsWithChildren } from 'react'
import { useFlag } from 'common'
import { ClockSkewBanner } from 'components/layouts/AppLayout/ClockSkewBanner'
import IncidentBanner from 'components/layouts/AppLayout/IncidentBanner'
import { IncidentBanner } from 'components/layouts/AppLayout/IncidentBanner'
import { NoticeBanner } from 'components/layouts/AppLayout/NoticeBanner'
import { OrganizationResourceBanner } from '../Organization/HeaderBanner'
export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {
const ongoingIncident = useFlag('ongoingIncident')
const ongoingIncident =
useFlag('ongoingIncident') || process.env.NEXT_PUBLIC_ONGOING_INCIDENT === 'true'
const showNoticeBanner = useFlag('showNoticeBanner')
const clockSkewBanner = useFlag('clockSkewBanner')

View File

@@ -2,7 +2,7 @@ import Link from 'next/link'
import { HeaderBanner } from 'components/interfaces/Organization/HeaderBanner'
const IncidentBanner = () => {
export const IncidentBanner = () => {
return (
<Link href="https://status.supabase.com" target="_blank" rel="noopener noreferrer">
<HeaderBanner
@@ -13,5 +13,3 @@ const IncidentBanner = () => {
</Link>
)
}
export default IncidentBanner

View File

@@ -123,7 +123,8 @@
"AI_PRO_MODEL",
"AI_NORMAL_MODEL",
"SUPPORT_SUPABASE_SECRET_KEY",
"NEXT_PUBLIC_IS_NIMBUS"
"NEXT_PUBLIC_IS_NIMBUS",
"NEXT_PUBLIC_ONGOING_INCIDENT"
],
"passThroughEnv": ["CURRENT_CLI_VERSION", "VERCEL_GIT_COMMIT_SHA"],
"outputs": [".next/**", "!.next/cache/**"]