2022-01-06 05:27:13 +00:00
|
|
|
import React from 'react'
|
2022-06-04 07:26:53 +00:00
|
|
|
import { useRouter } from 'next/router';
|
2022-01-06 05:27:13 +00:00
|
|
|
|
|
|
|
const GeneralHeader = () => {
|
2022-06-04 07:26:53 +00:00
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
function pushRouter(e) {
|
|
|
|
let url = e.target.dataset.href;
|
|
|
|
router.push(url);
|
|
|
|
}
|
|
|
|
|
2022-01-06 05:27:13 +00:00
|
|
|
return (
|
|
|
|
<header>
|
2022-06-04 07:26:53 +00:00
|
|
|
<a className="logo-link-block" onClick={ () => { pushRouter("/") } }><h1>Tben.me</h1></a>
|
2022-01-06 05:27:13 +00:00
|
|
|
<nav>
|
2022-06-04 07:26:53 +00:00
|
|
|
<a data-href="/" onClick={ (e) => { pushRouter(e) } }>Home</a>
|
|
|
|
<a data-href="/about" onClick={ (e) => { pushRouter(e) } }>About Me</a>
|
|
|
|
<a data-href="/work" onClick={ (e) => { pushRouter(e) } }>My Work</a>
|
|
|
|
<a data-href="#" href='/documents/Benjamin_Toby_CV-updated.pdf' target="_blank">My Resume</a>
|
|
|
|
<a data-href="/contact" onClick={ (e) => { pushRouter(e) } }>Contact Me</a>
|
2022-01-06 05:27:13 +00:00
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default GeneralHeader
|