import { type AnyRoute, type ParsedLocation, redirect, } from '@tanstack/solid-router'; import { ProLink } from '../ui/pro-link'; export function guardRouteIndexAsNotFound( this: AnyRoute, { location }: { location: ParsedLocation } ) { // biome-ignore lint/performance/useTopLevelRegex: if (location.pathname.replace(/\/+$/, '') === this.id) { throw redirect({ href: '/404', replace: true, reloadDocument: true, }); } } export function AppNotFoundComponent() { return (

404 Page Not Found

Sorry, we couldn't find the page you're looking for.

Return to website
); }