()
| 3 | import Link from 'next/link' |
| 4 | |
| 5 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected