Skip to content

Commit

Permalink
Attempt to load Banner on client side only
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Sep 19, 2023
1 parent 5d20486 commit 24a28cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ type BannerProps = {
}

export function Banner({ children }: BannerProps) {
const [hasMounted, setHasMounted] = React.useState(false)

React.useEffect(() => {
setHasMounted(true)
}, [])

if (!hasMounted) {
return null
}
return (
<Box
as="div"
Expand Down

0 comments on commit 24a28cc

Please sign in to comment.