diff --git a/src/components/site-banner.tsx b/src/components/site-banner.tsx deleted file mode 100644 index 83656acf..00000000 --- a/src/components/site-banner.tsx +++ /dev/null @@ -1,55 +0,0 @@ -"use client"; - -import Link from "next/link"; -import { X } from "lucide-react"; -import { useEffect, useState } from "react"; - -const STORAGE_KEY = "ocb-banner-dismissed-v1"; - -/** - * Top sticky notification banner. Persists dismissal in localStorage so it - * doesn't reappear on every navigation. - */ -export function SiteBanner() { - const [hidden, setHidden] = useState(false); - - useEffect(() => { - try { - if (window.localStorage.getItem(STORAGE_KEY) === "1") setHidden(true); - } catch { - // ignore - } - }, []); - - if (hidden) return null; - - return ( -
- - The first decentralized benchmark network for crypto infrastructure is live.{" "} -
- - Read the announcement. - -
- -
- ); -} diff --git a/src/components/site-header.tsx b/src/components/site-header.tsx index 7d11b1b8..712f67e4 100644 --- a/src/components/site-header.tsx +++ b/src/components/site-header.tsx @@ -3,7 +3,6 @@ import { Menu, X } from "lucide-react"; import Link from "next/link"; import { useEffect, useRef, useState } from "react"; -import { SiteBanner } from "@/components/site-banner"; import { SiteLogoSwitcher } from "@/components/site-logo-switcher"; import { ThemeToggle } from "@/components/theme-toggle"; @@ -26,9 +25,9 @@ const NAV = [ export function SiteHeader() { const [open, setOpen] = useState(false); const headerRef = useRef(null); - // Sensible initial estimate (banner + nav + iOS safe area) so the page - // does not jump on first paint; ResizeObserver refines it after mount. - const [headerH, setHeaderH] = useState(96); + // Initial estimate matches the rendered header height so the spacer + // doesn't jump on first paint; ResizeObserver refines it after mount. + const [headerH, setHeaderH] = useState(64); // Close the mobile menu when the viewport crosses md so the dropdown // doesn't stick around as the desktop nav reappears. @@ -43,8 +42,7 @@ export function SiteHeader() { }, [open]); // Measure the fixed header so we can reserve the same height in the - // flow with a spacer. ResizeObserver picks up the change when the - // banner is dismissed or the viewport resizes. + // flow with a spacer. ResizeObserver picks up viewport resizes. useEffect(() => { const el = headerRef.current; if (!el) return; @@ -68,7 +66,6 @@ export function SiteHeader() { className="fixed top-0 left-0 right-0 z-50 flex flex-col font-sans pt-[env(safe-area-inset-top)] bg-surface" style={{ transform: "translate3d(0, 0, 0)" }} > -
@@ -155,9 +152,7 @@ export function SiteHeader() {
{/* Spacer reserves the fixed header's height in the document flow - so page content does not start under it. Height tracks the - header via ResizeObserver, so dismissing the banner reclaims - the freed space automatically. */} + so page content does not start under it. */}
);