feat: replace login route with auth modal
- Add AuthModal to root layout driven by ?modal=auth search param - Update multiplayer and play beforeLoad redirects to use modal - Update NavAuth and Hero links to use modal - Delete login route and NavLogin component
This commit is contained in:
parent
32ee1edf80
commit
dc11213cb5
8 changed files with 41 additions and 79 deletions
|
|
@ -12,7 +12,6 @@ import { Route as rootRouteImport } from './routes/__root'
|
|||
import { Route as ResetPasswordRouteImport } from './routes/reset-password'
|
||||
import { Route as PlayRouteImport } from './routes/play'
|
||||
import { Route as MultiplayerRouteImport } from './routes/multiplayer'
|
||||
import { Route as LoginRouteImport } from './routes/login'
|
||||
import { Route as ForgotPasswordRouteImport } from './routes/forgot-password'
|
||||
import { Route as AboutRouteImport } from './routes/about'
|
||||
import { Route as IndexRouteImport } from './routes/index'
|
||||
|
|
@ -35,11 +34,6 @@ const MultiplayerRoute = MultiplayerRouteImport.update({
|
|||
path: '/multiplayer',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const LoginRoute = LoginRouteImport.update({
|
||||
id: '/login',
|
||||
path: '/login',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const ForgotPasswordRoute = ForgotPasswordRouteImport.update({
|
||||
id: '/forgot-password',
|
||||
path: '/forgot-password',
|
||||
|
|
@ -75,7 +69,6 @@ export interface FileRoutesByFullPath {
|
|||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/forgot-password': typeof ForgotPasswordRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/multiplayer': typeof MultiplayerRouteWithChildren
|
||||
'/play': typeof PlayRoute
|
||||
'/reset-password': typeof ResetPasswordRoute
|
||||
|
|
@ -87,7 +80,6 @@ export interface FileRoutesByTo {
|
|||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/forgot-password': typeof ForgotPasswordRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/play': typeof PlayRoute
|
||||
'/reset-password': typeof ResetPasswordRoute
|
||||
'/multiplayer': typeof MultiplayerIndexRoute
|
||||
|
|
@ -99,7 +91,6 @@ export interface FileRoutesById {
|
|||
'/': typeof IndexRoute
|
||||
'/about': typeof AboutRoute
|
||||
'/forgot-password': typeof ForgotPasswordRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/multiplayer': typeof MultiplayerRouteWithChildren
|
||||
'/play': typeof PlayRoute
|
||||
'/reset-password': typeof ResetPasswordRoute
|
||||
|
|
@ -113,7 +104,6 @@ export interface FileRouteTypes {
|
|||
| '/'
|
||||
| '/about'
|
||||
| '/forgot-password'
|
||||
| '/login'
|
||||
| '/multiplayer'
|
||||
| '/play'
|
||||
| '/reset-password'
|
||||
|
|
@ -125,7 +115,6 @@ export interface FileRouteTypes {
|
|||
| '/'
|
||||
| '/about'
|
||||
| '/forgot-password'
|
||||
| '/login'
|
||||
| '/play'
|
||||
| '/reset-password'
|
||||
| '/multiplayer'
|
||||
|
|
@ -136,7 +125,6 @@ export interface FileRouteTypes {
|
|||
| '/'
|
||||
| '/about'
|
||||
| '/forgot-password'
|
||||
| '/login'
|
||||
| '/multiplayer'
|
||||
| '/play'
|
||||
| '/reset-password'
|
||||
|
|
@ -149,7 +137,6 @@ export interface RootRouteChildren {
|
|||
IndexRoute: typeof IndexRoute
|
||||
AboutRoute: typeof AboutRoute
|
||||
ForgotPasswordRoute: typeof ForgotPasswordRoute
|
||||
LoginRoute: typeof LoginRoute
|
||||
MultiplayerRoute: typeof MultiplayerRouteWithChildren
|
||||
PlayRoute: typeof PlayRoute
|
||||
ResetPasswordRoute: typeof ResetPasswordRoute
|
||||
|
|
@ -178,13 +165,6 @@ declare module '@tanstack/react-router' {
|
|||
preLoaderRoute: typeof MultiplayerRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/login': {
|
||||
id: '/login'
|
||||
path: '/login'
|
||||
fullPath: '/login'
|
||||
preLoaderRoute: typeof LoginRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/forgot-password': {
|
||||
id: '/forgot-password'
|
||||
path: '/forgot-password'
|
||||
|
|
@ -250,7 +230,6 @@ const rootRouteChildren: RootRouteChildren = {
|
|||
IndexRoute: IndexRoute,
|
||||
AboutRoute: AboutRoute,
|
||||
ForgotPasswordRoute: ForgotPasswordRoute,
|
||||
LoginRoute: LoginRoute,
|
||||
MultiplayerRoute: MultiplayerRouteWithChildren,
|
||||
PlayRoute: PlayRoute,
|
||||
ResetPasswordRoute: ResetPasswordRoute,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue