MCPcopy Create free account
hub / github.com/TanStack/query / Header

Function Header

examples/react/nextjs/src/components/Header.tsx:5–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import Link from 'next/link'
4
5export const Header = () => {
6 const { pathname } = useRouter()
7
8 return (
9 <header>
10 <Link href="/" className={pathname === '/' ? 'is-active' : ''}>
11 Home
12 </Link>
13 <Link
14 href="/client-only"
15 className={pathname === '/client-only' ? 'is-active' : ''}
16 >
17 Client-Only
18 </Link>
19 <style jsx>{`
20 header {
21 margin-bottom: 25px;
22 }
23 a {
24 font-size: 14px;
25 margin-right: 15px;
26 text-decoration: none;
27 }
28 .is-active {
29 text-decoration: underline;
30 }
31 `}</style>
32 </header>
33 )
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected