diff --git a/src/components/layout.tsx b/src/components/layout.tsx index 24d9e175..685998a2 100644 --- a/src/components/layout.tsx +++ b/src/components/layout.tsx @@ -4,7 +4,7 @@ import Footer from "./footer" import TakeATour from "./TakeATour" const Layout = ({headerTheme, showTour = false, children}: {headerTheme: "light"|"dark", showTour?: boolean, children: React.ReactNode|React.ReactNode[]}) => { - const [closeTour, setCloseTour] = React.useState(!!localStorage.getItem('@estuary/closeTour')) + const [closeTour, setCloseTour] = React.useState(typeof window !== 'undefined' && !!localStorage.getItem('@estuary/closeTour')) return (