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:
@@ -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')
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/**"]
|
||||
|
||||
Reference in New Issue
Block a user