Download web/src/components/Nav.tsx from Leon4gr45/openweb: direct link, hf CLI and curl.
- Browser
- Download file 970 Bytes
-
https://huggingface.co/spaces/Leon4gr45/openweb/resolve/main/web/src/components/Nav.tsx
- Command line
-
hf download hf://spaces/Leon4gr45/openweb/web/src/components/Nav.tsx
-
curl -L -o Nav.tsx https://huggingface.co/spaces/Leon4gr45/openweb/resolve/main/web/src/components/Nav.tsx
970 Bytes
| import Link from "next/link"; | |
| import { Suspense } from "react"; | |
| import { ActiveNavLinks, NavLinksView } from "./NavLinks"; | |
| // Server component: the header is part of the static shell. Only the links read the pathname, and | |
| // usePathname() suspends while dynamic routes like /videos/[id] prerender, so they get their own | |
| // Suspense boundary with an un-highlighted fallback of identical size. | |
| export function Nav() { | |
| return ( | |
| <header className="sticky top-0 z-30 border-b border-line bg-page/90 backdrop-blur"> | |
| <div className="mx-auto flex max-w-7xl flex-wrap items-center gap-x-6 gap-y-2 px-6 py-3"> | |
| <Link href="/" className="flex items-baseline gap-2"> | |
| <span className="text-base font-semibold">Video RAG</span> | |
| <span className="text-xs text-muted">Visual Mentor</span> | |
| </Link> | |
| <Suspense fallback={<NavLinksView path={null} />}> | |
| <ActiveNavLinks /> | |
| </Suspense> | |
| </div> | |
| </header> | |
| ); | |
| } | |