1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00
_/wmr/public/header.js

23 lines
450 B
JavaScript
Raw Normal View History

2021-04-20 19:11:14 +09:00
import { useLocation } from "preact-iso/router";
export default function Header() {
const { url } = useLocation();
return (
<header>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/error">Error</a>
</nav>
<label>
URL:
<input
readonly
value={url}
ref={(c) => c && (c.size = c.value.length)}
/>
</label>
</header>
);
}