mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-05-19 09:54:58 +00:00
Improve Item page
Add 500 page and dedicated 404 page Add fake cache to tester API Adjust some styles for better readability and usability
This commit is contained in:
parent
40c19335cf
commit
383f22bdf8
11 changed files with 297 additions and 91 deletions
|
@ -1,6 +1,8 @@
|
|||
import { wrap } from "svelte-spa-router/wrap";
|
||||
|
||||
import PageLoading from "%/pages/PageLoading.svelte";
|
||||
import Page404 from "%/pages/Page404.svelte";
|
||||
import Page500 from "%/pages/Page500.svelte";
|
||||
|
||||
const routes = {
|
||||
"/": wrap({
|
||||
|
@ -15,7 +17,7 @@ const routes = {
|
|||
conditions: [],
|
||||
userData: { showNavBar: true, fullWidth: true, },
|
||||
}),
|
||||
"/item/:name": wrap({
|
||||
"/item/:uuid": wrap({
|
||||
asyncComponent: () => import("%/pages/PageItem.svelte"),
|
||||
loadingComponent: PageLoading,
|
||||
conditions: [],
|
||||
|
@ -39,11 +41,21 @@ const routes = {
|
|||
conditions: [],
|
||||
userData: { showNavBar: true, fullWidth: false, },
|
||||
}),
|
||||
'*': wrap({
|
||||
"/ForOhFor": wrap({
|
||||
component: Page404,
|
||||
conditions: [],
|
||||
userData: { showNavBar: true, fullWidth: false, },
|
||||
})
|
||||
}),
|
||||
"/ServerError": wrap({
|
||||
component: Page500,
|
||||
conditions: [],
|
||||
userData: { showNavBar: true, fullWidth: false, },
|
||||
}),
|
||||
"*": wrap({
|
||||
component: Page404,
|
||||
conditions: [],
|
||||
userData: { showNavBar: true, fullWidth: false, },
|
||||
}),
|
||||
}
|
||||
|
||||
export default routes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue