Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
Something went wrong. Try again.
TypeScript
at feat/sentry
1234567891011121314151617181920212223242526import { parseURL } from 'ufo'
/*! @__NO_SIDE_EFFECTS__ */export const definePageMeta = (_args: any) => {}
export const useRoute = (_path?: string) => useNuxtApp().$route
export function handleNavigationClicks (e: MouseEvent | KeyboardEvent) { const anchor = (e.target as HTMLElement).closest('a') if (anchor) { const href = anchor.getAttribute('href') if (href) { e.preventDefault() const url = parseURL(href) if ( !('external' in anchor.dataset) && (!url.host || url.host === 'roe.dev') ) { return navigateTo(url.pathname) }
return navigateTo(href, { external: true }) } }}