2024-09-16 07:36:35 +00:00
|
|
|
import { SearchPage } from 'pages/search'
|
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-09-03 10:13:51 +00:00
|
|
|
import { ModPage } from '../pages/mod'
|
2024-07-11 12:52:48 +00:00
|
|
|
import { ModsPage } from '../pages/mods'
|
2024-09-03 08:05:37 +00:00
|
|
|
import { ProfilePage } from '../pages/profile'
|
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-09-03 10:13:51 +00:00
|
|
|
mod: '/mod/: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',
|
2024-09-16 07:36:35 +00:00
|
|
|
search: '/search',
|
2024-07-12 13:55:42 +00:00
|
|
|
settingsProfile: '/settings-profile',
|
|
|
|
settingsRelays: '/settings-relays',
|
|
|
|
settingsPreferences: '/settings-preferences',
|
2024-09-03 08:05:37 +00:00
|
|
|
settingsAdmin: '/settings-admin',
|
|
|
|
profile: '/profile/:nprofile'
|
2024-07-11 11:45:59 +00:00
|
|
|
}
|
|
|
|
|
2024-09-03 10:13:51 +00:00
|
|
|
export const getModPageRoute = (eventId: string) =>
|
|
|
|
appRoutes.mod.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-09-03 08:05:37 +00:00
|
|
|
export const getProfilePageRoute = (nprofile: string) =>
|
|
|
|
appRoutes.profile.replace(':nprofile', nprofile)
|
|
|
|
|
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
|
|
|
{
|
2024-09-03 10:13:51 +00:00
|
|
|
path: appRoutes.mod,
|
|
|
|
element: <ModPage />
|
2024-07-25 15:05:28 +00:00
|
|
|
},
|
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
|
|
|
},
|
2024-09-16 07:36:35 +00:00
|
|
|
{
|
|
|
|
path: appRoutes.search,
|
|
|
|
element: <SearchPage />
|
|
|
|
},
|
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-09-03 08:05:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: appRoutes.profile,
|
|
|
|
element: <ProfilePage />
|
2024-07-11 11:45:59 +00:00
|
|
|
}
|
|
|
|
]
|