Login/logout
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
// Import Routes
|
||||
|
||||
import { Route as rootRoute } from './routes/__root'
|
||||
import { Route as LoginImport } from './routes/login'
|
||||
import { Route as AboutImport } from './routes/about'
|
||||
import { Route as IndexImport } from './routes/index'
|
||||
import { Route as SessionsIndexImport } from './routes/sessions.index'
|
||||
@@ -19,6 +20,12 @@ import { Route as CampaignsCampaignIdImport } from './routes/campaigns.$campaign
|
||||
|
||||
// Create/Update Routes
|
||||
|
||||
const LoginRoute = LoginImport.update({
|
||||
id: '/login',
|
||||
path: '/login',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
const AboutRoute = AboutImport.update({
|
||||
id: '/about',
|
||||
path: '/about',
|
||||
@@ -67,6 +74,13 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof AboutImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/login': {
|
||||
id: '/login'
|
||||
path: '/login'
|
||||
fullPath: '/login'
|
||||
preLoaderRoute: typeof LoginImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/campaigns/$campaignId': {
|
||||
id: '/campaigns/$campaignId'
|
||||
path: '/campaigns/$campaignId'
|
||||
@@ -96,6 +110,7 @@ declare module '@tanstack/react-router' {
|
||||
export interface FileRoutesByFullPath {
|
||||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/campaigns/$campaignId': typeof CampaignsCampaignIdRoute
|
||||
'/campaigns': typeof CampaignsIndexRoute
|
||||
'/sessions': typeof SessionsIndexRoute
|
||||
@@ -104,6 +119,7 @@ export interface FileRoutesByFullPath {
|
||||
export interface FileRoutesByTo {
|
||||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/campaigns/$campaignId': typeof CampaignsCampaignIdRoute
|
||||
'/campaigns': typeof CampaignsIndexRoute
|
||||
'/sessions': typeof SessionsIndexRoute
|
||||
@@ -113,6 +129,7 @@ export interface FileRoutesById {
|
||||
__root__: typeof rootRoute
|
||||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/campaigns/$campaignId': typeof CampaignsCampaignIdRoute
|
||||
'/campaigns/': typeof CampaignsIndexRoute
|
||||
'/sessions/': typeof SessionsIndexRoute
|
||||
@@ -123,15 +140,23 @@ export interface FileRouteTypes {
|
||||
fullPaths:
|
||||
| '/'
|
||||
| '/about'
|
||||
| '/login'
|
||||
| '/campaigns/$campaignId'
|
||||
| '/campaigns'
|
||||
| '/sessions'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to: '/' | '/about' | '/campaigns/$campaignId' | '/campaigns' | '/sessions'
|
||||
to:
|
||||
| '/'
|
||||
| '/about'
|
||||
| '/login'
|
||||
| '/campaigns/$campaignId'
|
||||
| '/campaigns'
|
||||
| '/sessions'
|
||||
id:
|
||||
| '__root__'
|
||||
| '/'
|
||||
| '/about'
|
||||
| '/login'
|
||||
| '/campaigns/$campaignId'
|
||||
| '/campaigns/'
|
||||
| '/sessions/'
|
||||
@@ -141,6 +166,7 @@ export interface FileRouteTypes {
|
||||
export interface RootRouteChildren {
|
||||
IndexRoute: typeof IndexRoute
|
||||
AboutRoute: typeof AboutRoute
|
||||
LoginRoute: typeof LoginRoute
|
||||
CampaignsCampaignIdRoute: typeof CampaignsCampaignIdRoute
|
||||
CampaignsIndexRoute: typeof CampaignsIndexRoute
|
||||
SessionsIndexRoute: typeof SessionsIndexRoute
|
||||
@@ -149,6 +175,7 @@ export interface RootRouteChildren {
|
||||
const rootRouteChildren: RootRouteChildren = {
|
||||
IndexRoute: IndexRoute,
|
||||
AboutRoute: AboutRoute,
|
||||
LoginRoute: LoginRoute,
|
||||
CampaignsCampaignIdRoute: CampaignsCampaignIdRoute,
|
||||
CampaignsIndexRoute: CampaignsIndexRoute,
|
||||
SessionsIndexRoute: SessionsIndexRoute,
|
||||
@@ -166,6 +193,7 @@ export const routeTree = rootRoute
|
||||
"children": [
|
||||
"/",
|
||||
"/about",
|
||||
"/login",
|
||||
"/campaigns/$campaignId",
|
||||
"/campaigns/",
|
||||
"/sessions/"
|
||||
@@ -177,6 +205,9 @@ export const routeTree = rootRoute
|
||||
"/about": {
|
||||
"filePath": "about.tsx"
|
||||
},
|
||||
"/login": {
|
||||
"filePath": "login.tsx"
|
||||
},
|
||||
"/campaigns/$campaignId": {
|
||||
"filePath": "campaigns.$campaignId.tsx"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user