Open History to see the last commit
1export const Link = (props: {
2 href: string
3 children: any
4 class?: string
5}) => {
6 // Links doing client-side navigation
7 return (
8 <a
9 href={props.href}
10 onClick={(e) => {
11 e.preventDefault()
12 history.pushState({}, '', props.href)
13 window.dispatchEvent(new PopStateEvent('popstate'))
14 }}
15 class={props.class}
16 >
17 {props.children}
18 </a>
19 )
20}