Skip to content

Commit

Permalink
fix: show site banner (#1923)
Browse files Browse the repository at this point in the history
  • Loading branch information
spsjvc authored Sep 24, 2024
1 parent ef3f295 commit 6af9fd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { twMerge } from 'tailwind-merge'
import Image from 'next/image'
import EclipseBottom from '@/images/eclipse_bottom.png'

import { SiteBanner } from './SiteBanner'
import { AppSidebar } from '../Sidebar/AppSidebar'
import { Toast } from './atoms/Toast'

Expand Down Expand Up @@ -54,7 +55,10 @@ export function Layout(props: LayoutProps) {
<div className="flex flex-row">
<AppSidebar />

<main className="grow">{props.children}</main>
<main className="grow">
<SiteBanner></SiteBanner>
{props.children}
</main>

<Toast />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ export const SiteBanner = ({

// show info-banner till expiry date if provided
const showInfoBanner =
!expiryDate ||
(expiryDate && dayjs.utc().isBefore(dayjs(expiryDate).utc(true)))
!!children &&
(!expiryDate ||
(expiryDate && dayjs.utc().isBefore(dayjs(expiryDate).utc(true))))

if (showArbiscanOneIncidentBanner) {
return <SiteBannerArbiscanIncident type="arbitrum-one" />
Expand Down

0 comments on commit 6af9fd4

Please sign in to comment.