AppBannerWrapper.tsx26 lines · main
| 1 | import { useFlag } from 'common' |
| 2 | import { PropsWithChildren } from 'react' |
| 3 | |
| 4 | import { OrganizationResourceBanner } from '../Organization/HeaderBanner' |
| 5 | import { ClockSkewBanner } from '@/components/layouts/AppLayout/ClockSkewBanner' |
| 6 | import { FlyDeprecationBanner } from '@/components/layouts/AppLayout/FlyDeprecationBanner' |
| 7 | import { NoticeBanner } from '@/components/layouts/AppLayout/NoticeBanner' |
| 8 | import { StatusPageBanner } from '@/components/layouts/AppLayout/StatusPageBanner' |
| 9 | |
| 10 | export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => { |
| 11 | const showNoticeBanner = useFlag('showNoticeBanner') |
| 12 | const clockSkewBanner = useFlag('clockSkewBanner') |
| 13 | |
| 14 | return ( |
| 15 | <div className="flex flex-col"> |
| 16 | <div className="shrink-0"> |
| 17 | <StatusPageBanner /> |
| 18 | {showNoticeBanner && <NoticeBanner />} |
| 19 | <FlyDeprecationBanner /> |
| 20 | <OrganizationResourceBanner /> |
| 21 | {clockSkewBanner && <ClockSkewBanner />} |
| 22 | </div> |
| 23 | {children} |
| 24 | </div> |
| 25 | ) |
| 26 | } |