Skip to content

Commit

Permalink
Add hide/show Banner component state
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorfman committed Jun 25, 2024
1 parent 63c8294 commit c07c672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Layout/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const Header: FunctionComponent<Props> = ({ minimal, colorTheme, navRef }
const [sticky, setSticky] = useState<boolean>(false)
const router = useRouter()
const { pathname } = router
const [showBanner, setShowBanner] = useState(false)

const source = pathname.slice(1) || 'about-home'

Expand Down Expand Up @@ -56,7 +57,7 @@ export const Header: FunctionComponent<Props> = ({ minimal, colorTheme, navRef }
<Disclosure as="nav" className={classNames('fixed top-0 left-0 right-0 z-[1030]')} ref={navRef}>
{({ open, close }) => (
<>
<Banner />
{showBanner && <Banner />}
<HeaderContent
colorTheme={colorTheme}
minimal={minimal}
Expand Down

0 comments on commit c07c672

Please sign in to comment.