sigit.io/src/routes/index.tsx
Sabir Hassan a70d02b4ea
All checks were successful
Release / build_and_release (push) Successful in 43s
chore: revert changes related to displaying nsecbunker connection string
2024-03-25 10:30:01 +05:00

37 lines
773 B
TypeScript

import { LandingPage } from '../pages/landing/LandingPage'
import { Login } from '../pages/login'
import { ProfilePage } from '../pages/profile'
import { hexToNpub } from '../utils'
export const appPrivateRoutes = {
homePage: '/'
}
export const appPublicRoutes = {
profile: '/profile/:npub',
login: '/login',
help: 'https://help.sigit.io'
}
export const getProfileRoute = (hexKey: string) =>
appPublicRoutes.profile.replace(':npub', hexToNpub(hexKey))
export const publicRoutes = [
{
path: appPublicRoutes.login,
hiddenWhenLoggedIn: true,
element: <Login />
},
{
path: appPublicRoutes.profile,
element: <ProfilePage />
}
]
export const privateRoutes = [
{
path: appPrivateRoutes.homePage,
element: <LandingPage />
}
]