2024-04-08 12:45:51 +00:00
|
|
|
import { DecryptZip } from '../pages/decrypt'
|
|
|
|
import { HomePage } from '../pages/home'
|
2024-02-28 16:49:44 +00:00
|
|
|
import { LandingPage } from '../pages/landing/LandingPage'
|
|
|
|
import { Login } from '../pages/login'
|
2024-03-01 10:16:35 +00:00
|
|
|
import { ProfilePage } from '../pages/profile'
|
|
|
|
import { hexToNpub } from '../utils'
|
2024-04-18 11:12:11 +00:00
|
|
|
import { SignDocument } from '../pages/sign'
|
2024-02-28 16:49:44 +00:00
|
|
|
|
2024-03-22 07:46:57 +00:00
|
|
|
export const appPrivateRoutes = {
|
2024-04-08 12:45:51 +00:00
|
|
|
homePage: '/',
|
2024-04-19 10:57:44 +00:00
|
|
|
decryptZip: '/decrypt',
|
2024-04-18 11:12:11 +00:00
|
|
|
sign: '/sign'
|
2024-03-22 07:46:57 +00:00
|
|
|
}
|
|
|
|
|
2024-02-28 16:49:44 +00:00
|
|
|
export const appPublicRoutes = {
|
2024-03-01 10:16:35 +00:00
|
|
|
profile: '/profile/:npub',
|
2024-04-08 12:45:51 +00:00
|
|
|
landingPage: '/',
|
2024-02-28 16:49:44 +00:00
|
|
|
login: '/login',
|
|
|
|
help: 'https://help.sigit.io'
|
|
|
|
}
|
|
|
|
|
2024-03-01 10:16:35 +00:00
|
|
|
export const getProfileRoute = (hexKey: string) =>
|
|
|
|
appPublicRoutes.profile.replace(':npub', hexToNpub(hexKey))
|
|
|
|
|
2024-02-28 16:49:44 +00:00
|
|
|
export const publicRoutes = [
|
2024-04-08 12:45:51 +00:00
|
|
|
{
|
|
|
|
path: appPublicRoutes.landingPage,
|
|
|
|
hiddenWhenLoggedIn: true,
|
|
|
|
element: <LandingPage />
|
|
|
|
},
|
2024-02-28 16:49:44 +00:00
|
|
|
{
|
|
|
|
path: appPublicRoutes.login,
|
|
|
|
hiddenWhenLoggedIn: true,
|
|
|
|
element: <Login />
|
2024-03-01 10:16:35 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: appPublicRoutes.profile,
|
|
|
|
element: <ProfilePage />
|
2024-02-28 16:49:44 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
export const privateRoutes = [
|
|
|
|
{
|
|
|
|
path: appPrivateRoutes.homePage,
|
2024-04-08 12:45:51 +00:00
|
|
|
element: <HomePage />
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: appPrivateRoutes.decryptZip,
|
|
|
|
element: <DecryptZip />
|
2024-04-18 11:12:11 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: appPrivateRoutes.sign,
|
|
|
|
element: <SignDocument />
|
2024-02-28 16:49:44 +00:00
|
|
|
}
|
|
|
|
]
|