blob: cd3bde16c32fd73d21dd9bf4aca50dc036944127 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
'use client'
import React, { ReactNode } from 'react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
export default function Title({headerImage}: {headerImage: ReactNode}) {
const pathname = usePathname()
const isHomepage = pathname === '/'
return (
<header className={isHomepage ? 'homepage' : undefined}>
{isHomepage
? <h1 className="siteTitle">tempest.dev</h1>
: <Link href="/" className="siteTitle">tempest.dev</Link>
}
<nav>
<Link href="/about">about</Link>
<Link href="/contact">contact</Link>
<Link target="blank" href="https://git.tempest.dev/ashe/tempest.dev">code</Link>
</nav>
<div className="headerBackground">
{headerImage}
</div>
</header>
)
}
|