mirror of
https://github.com/JonasunderscoreJones/blog.jonasjones.dev.git
synced 2025-10-22 21:09:20 +02:00
cleaned up routes
This commit is contained in:
parent
777c28899b
commit
6fa354d1d8
1 changed files with 2 additions and 12 deletions
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue