import Link from "next/link"; import Logo from "@/components/logo"; import MobileNav from "@/components/header/mobile-nav"; import DesktopNav from "@/components/header/desktop-nav"; import { fetchSanityNavigation, fetchSanitySettings } from "@/sanity/lib/fetch"; import { getDynamicFetchOptions, type DynamicFetchOptions, } from "@/sanity/lib/live"; import { NAVIGATION_QUERY_RESULT, SETTINGS_QUERY_RESULT } from "@/sanity.types"; type HeaderProps = { settings: SETTINGS_QUERY_RESULT; navigation: NAVIGATION_QUERY_RESULT; }; export function Header({ settings, navigation }: HeaderProps) { return (
); } export function HeaderFallback() { return (
); } export async function DynamicHeader() { const { perspective, stega } = await getDynamicFetchOptions(); return ; } export async function CachedHeader({ perspective, stega, }: DynamicFetchOptions) { const [settings, navigation] = await Promise.all([ fetchSanitySettings({ perspective, stega }), fetchSanityNavigation({ perspective, stega }), ]); return
; }