Files
frontend-svelte/src/routes/router.ts
T

24 lines
515 B
TypeScript
Raw Normal View History

import { createRouter } from 'sv-router';
import Home from './Home.svelte';
import Redirect from './Redirect.svelte';
/**
* Single-page router for glyphdiff.
*
* Currently exposes one route; structure exists so additional routes can be
* added without touching the app shell.
*/
export const {
isActive,
navigate,
p,
preload,
route,
} = createRouter({
'/': Home,
/**
* Any unmatched path redirects to home until additional routes exist.
*/
'*notfound': Redirect,
});