import { MobileNavigation } from "@syntax/MobileNavigation"; import { usePageContext } from "vike-react/usePageContext"; import { ThemeProvider } from "@/providers/ThemeProvider"; import { useEffect, useState, Suspense } from "react"; import { ThemeSelector } from "@syntax/ThemeSelector"; import { clientOnly } from "vike-react/clientOnly"; import { ToastContainer } from "react-toastify"; import { Navigation } from "@syntax/Navigation"; import { Link } from "@/components/common/Link"; import { Hero } from "@syntax/Hero"; import { Logo } from "@syntax/Logo"; import clsx from "clsx"; import "./style.css"; import "./tailwind.css"; import "./prism.css"; import "unfonts.css"; const Search = clientOnly(() => import("@syntax/Search").then((module) => module.Search)); function GitHubIcon(props: React.ComponentPropsWithoutRef<"svg">) { return ( ); } function Header() { let [isScrolled, setIsScrolled] = useState(false); useEffect(() => { function onScroll() { setIsScrolled(window.scrollY > 0); } onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => { window.removeEventListener("scroll", onScroll); }; }, []); return (
Memento Dev
}>
); } export default function DefaultLayout({ children }: { children: React.ReactNode }) { const { urlPathname } = usePageContext(); const isHomePage = urlPathname === "/"; return (
{isHomePage && }
{children}
); }