(props: {
href: string
children: any
class?: string
})
| 1 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected