degmods.com/src/routes/index.tsx

92 lines
2.0 KiB
TypeScript
Raw Normal View History

2024-07-11 15:09:47 +00:00
import { AboutPage } from '../pages/about'
2024-07-11 13:34:12 +00:00
import { BlogsPage } from '../pages/blogs'
2024-07-11 12:15:03 +00:00
import { GamesPage } from '../pages/games'
2024-07-11 11:45:59 +00:00
import { HomePage } from '../pages/home'
2024-07-25 15:05:28 +00:00
import { InnerModPage } from '../pages/innerMod'
2024-07-11 12:52:48 +00:00
import { ModsPage } from '../pages/mods'
2024-07-12 13:55:42 +00:00
import { SettingsPage } from '../pages/settings'
2024-07-11 20:03:52 +00:00
import { SubmitModPage } from '../pages/submitMod'
2024-07-12 09:22:31 +00:00
import { WritePage } from '../pages/write'
2024-07-11 11:45:59 +00:00
2024-07-11 12:15:03 +00:00
export const appRoutes = {
2024-07-11 11:45:59 +00:00
index: '/',
2024-07-11 12:15:03 +00:00
home: '/home',
games: '/games',
mods: '/mods',
2024-08-26 12:11:33 +00:00
modsInner: '/mods-inner/:naddr',
2024-07-11 12:15:03 +00:00
about: '/about',
2024-07-11 20:03:52 +00:00
blog: '/blog',
2024-07-12 09:22:31 +00:00
submitMod: '/submit-mod',
2024-08-26 12:11:33 +00:00
editMod: '/edit-mod/:naddr',
2024-07-12 13:55:42 +00:00
write: '/write',
settingsProfile: '/settings-profile',
settingsRelays: '/settings-relays',
settingsPreferences: '/settings-preferences',
settingsAdmin: '/settings-admin'
2024-07-11 11:45:59 +00:00
}
2024-07-25 15:05:28 +00:00
export const getModsInnerPageRoute = (eventId: string) =>
2024-08-26 12:11:33 +00:00
appRoutes.modsInner.replace(':naddr', eventId)
2024-07-25 15:05:28 +00:00
2024-08-19 06:41:11 +00:00
export const getModsEditPageRoute = (eventId: string) =>
2024-08-26 12:11:33 +00:00
appRoutes.editMod.replace(':naddr', eventId)
2024-08-19 06:41:11 +00:00
2024-07-11 11:45:59 +00:00
export const routes = [
{
path: appRoutes.index,
element: <HomePage />
},
{
path: appRoutes.home,
element: <HomePage />
2024-07-11 12:15:03 +00:00
},
{
path: appRoutes.games,
element: <GamesPage />
},
{
path: appRoutes.mods,
2024-07-11 12:52:48 +00:00
element: <ModsPage />
2024-07-11 12:15:03 +00:00
},
2024-07-25 15:05:28 +00:00
{
path: appRoutes.modsInner,
element: <InnerModPage />
},
2024-07-11 12:15:03 +00:00
{
path: appRoutes.about,
2024-07-11 15:09:47 +00:00
element: <AboutPage />
2024-07-11 12:15:03 +00:00
},
{
path: appRoutes.blog,
2024-07-11 13:34:12 +00:00
element: <BlogsPage />
2024-07-11 20:03:52 +00:00
},
{
path: appRoutes.submitMod,
element: <SubmitModPage />
2024-07-12 09:22:31 +00:00
},
2024-08-06 10:46:38 +00:00
{
path: appRoutes.editMod,
element: <SubmitModPage />
},
2024-07-12 09:22:31 +00:00
{
path: appRoutes.write,
element: <WritePage />
2024-07-12 13:55:42 +00:00
},
{
path: appRoutes.settingsProfile,
element: <SettingsPage />
},
{
path: appRoutes.settingsRelays,
element: <SettingsPage />
},
{
path: appRoutes.settingsPreferences,
element: <SettingsPage />
},
{
path: appRoutes.settingsAdmin,
element: <SettingsPage />
2024-07-11 11:45:59 +00:00
}
]