Skip to content

Commit 19b6a41

Browse files
authored
chore: Add support to enable incident banner through env var (supabase#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.
1 parent 0e861a2 commit 19b6a41

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

apps/studio/components/interfaces/App/AppBannerWrapper.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import { PropsWithChildren } from 'react'
22

33
import { useFlag } from 'common'
44
import { ClockSkewBanner } from 'components/layouts/AppLayout/ClockSkewBanner'
5-
import IncidentBanner from 'components/layouts/AppLayout/IncidentBanner'
5+
import { IncidentBanner } from 'components/layouts/AppLayout/IncidentBanner'
66
import { NoticeBanner } from 'components/layouts/AppLayout/NoticeBanner'
77
import { OrganizationResourceBanner } from '../Organization/HeaderBanner'
88

99
export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {
10-
const ongoingIncident = useFlag('ongoingIncident')
10+
const ongoingIncident =
11+
useFlag('ongoingIncident') || process.env.NEXT_PUBLIC_ONGOING_INCIDENT === 'true'
1112
const showNoticeBanner = useFlag('showNoticeBanner')
1213
const clockSkewBanner = useFlag('clockSkewBanner')
1314

apps/studio/components/layouts/AppLayout/IncidentBanner.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Link from 'next/link'
22

33
import { HeaderBanner } from 'components/interfaces/Organization/HeaderBanner'
44

5-
const IncidentBanner = () => {
5+
export const IncidentBanner = () => {
66
return (
77
<Link href="https://status.supabase.com" target="_blank" rel="noopener noreferrer">
88
<HeaderBanner
@@ -13,5 +13,3 @@ const IncidentBanner = () => {
1313
</Link>
1414
)
1515
}
16-
17-
export default IncidentBanner

turbo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@
123123
"AI_PRO_MODEL",
124124
"AI_NORMAL_MODEL",
125125
"SUPPORT_SUPABASE_SECRET_KEY",
126-
"NEXT_PUBLIC_IS_NIMBUS"
126+
"NEXT_PUBLIC_IS_NIMBUS",
127+
"NEXT_PUBLIC_ONGOING_INCIDENT"
127128
],
128129
"passThroughEnv": ["CURRENT_CLI_VERSION", "VERCEL_GIT_COMMIT_SHA"],
129130
"outputs": [".next/**", "!.next/cache/**"]

0 commit comments

Comments
 (0)