sigit.io/src/routes/index.tsx
SwiftHawk 9fa3df3850
All checks were successful
Release / build_and_release (push) Successful in 56s
fix: update the url in DM to contain fileUrl and encryption key
2024-04-19 15:57:44 +05:00

56 lines
1.2 KiB
TypeScript

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