cleaned up routes

This commit is contained in:
J-onasJones 2024-06-15 22:36:33 +02:00
parent 777c28899b
commit 6fa354d1d8

View file

@ -1,21 +1,11 @@
import Home from './routes/Home.svelte'; import Home from './routes/Home.svelte';
import Loading from './routes/Loading.svelte';
import NotFound from './routes/NotFound.svelte'; import NotFound from './routes/NotFound.svelte';
import wrap from 'svelte-spa-router/wrap';
import Dashboard from './routes/Dashboard.svelte'; import Dashboard from './routes/Dashboard.svelte';
import Post from './routes/Post.svelte';
export default { export default {
'/': Home, '/': Home,
'/post/:year/:month/:day/:title': wrap({ '/post/:year/:month/:day/:title': Post,
// Note that this is a function that returns the import
asyncComponent: () => import('./routes/Post.svelte'),
// Show the loading component while the component is being downloaded
loadingComponent: Loading,
// Pass values for the `params` prop of the loading component
loadingParams: {
message: 'Loading the Name route…'
}
}),
'/dash': Dashboard, '/dash': Dashboard,
'*': NotFound '*': NotFound
}; };