Skip to content

Commit 9835367

Browse files
committed
rename to card
1 parent 4dd37f6 commit 9835367

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
lines changed

src/core/router/route-tree.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { Route as LoginImport } from './../../scenes/login'
1515
import { Route as AuthImport } from './../../scenes/_auth'
1616
import { Route as IndexImport } from './../../scenes/index'
1717
import { Route as AuthDashboardIndexImport } from './../../scenes/_auth/dashboard/index'
18-
import { Route as AuthDashboardDeckDeckIdIndexImport } from './../../scenes/_auth/dashboard/deck/$deckId/index'
18+
import { Route as AuthDashboardCardDeckIdIndexImport } from './../../scenes/_auth/dashboard/card/$deckId/index'
1919

2020
// Create/Update Routes
2121

@@ -42,10 +42,10 @@ const AuthDashboardIndexRoute = AuthDashboardIndexImport.update({
4242
getParentRoute: () => AuthRoute,
4343
} as any)
4444

45-
const AuthDashboardDeckDeckIdIndexRoute =
46-
AuthDashboardDeckDeckIdIndexImport.update({
47-
id: '/dashboard/deck/$deckId/',
48-
path: '/dashboard/deck/$deckId/',
45+
const AuthDashboardCardDeckIdIndexRoute =
46+
AuthDashboardCardDeckIdIndexImport.update({
47+
id: '/dashboard/card/$deckId/',
48+
path: '/dashboard/card/$deckId/',
4949
getParentRoute: () => AuthRoute,
5050
} as any)
5151

@@ -81,11 +81,11 @@ declare module '@tanstack/react-router' {
8181
preLoaderRoute: typeof AuthDashboardIndexImport
8282
parentRoute: typeof AuthImport
8383
}
84-
'/_auth/dashboard/deck/$deckId/': {
85-
id: '/_auth/dashboard/deck/$deckId/'
86-
path: '/dashboard/deck/$deckId'
87-
fullPath: '/dashboard/deck/$deckId'
88-
preLoaderRoute: typeof AuthDashboardDeckDeckIdIndexImport
84+
'/_auth/dashboard/card/$deckId/': {
85+
id: '/_auth/dashboard/card/$deckId/'
86+
path: '/dashboard/card/$deckId'
87+
fullPath: '/dashboard/card/$deckId'
88+
preLoaderRoute: typeof AuthDashboardCardDeckIdIndexImport
8989
parentRoute: typeof AuthImport
9090
}
9191
}
@@ -95,12 +95,12 @@ declare module '@tanstack/react-router' {
9595

9696
interface AuthRouteChildren {
9797
AuthDashboardIndexRoute: typeof AuthDashboardIndexRoute
98-
AuthDashboardDeckDeckIdIndexRoute: typeof AuthDashboardDeckDeckIdIndexRoute
98+
AuthDashboardCardDeckIdIndexRoute: typeof AuthDashboardCardDeckIdIndexRoute
9999
}
100100

101101
const AuthRouteChildren: AuthRouteChildren = {
102102
AuthDashboardIndexRoute: AuthDashboardIndexRoute,
103-
AuthDashboardDeckDeckIdIndexRoute: AuthDashboardDeckDeckIdIndexRoute,
103+
AuthDashboardCardDeckIdIndexRoute: AuthDashboardCardDeckIdIndexRoute,
104104
}
105105

106106
const AuthRouteWithChildren = AuthRoute._addFileChildren(AuthRouteChildren)
@@ -110,15 +110,15 @@ export interface FileRoutesByFullPath {
110110
'': typeof AuthRouteWithChildren
111111
'/login': typeof LoginRoute
112112
'/dashboard': typeof AuthDashboardIndexRoute
113-
'/dashboard/deck/$deckId': typeof AuthDashboardDeckDeckIdIndexRoute
113+
'/dashboard/card/$deckId': typeof AuthDashboardCardDeckIdIndexRoute
114114
}
115115

116116
export interface FileRoutesByTo {
117117
'/': typeof IndexRoute
118118
'': typeof AuthRouteWithChildren
119119
'/login': typeof LoginRoute
120120
'/dashboard': typeof AuthDashboardIndexRoute
121-
'/dashboard/deck/$deckId': typeof AuthDashboardDeckDeckIdIndexRoute
121+
'/dashboard/card/$deckId': typeof AuthDashboardCardDeckIdIndexRoute
122122
}
123123

124124
export interface FileRoutesById {
@@ -127,21 +127,21 @@ export interface FileRoutesById {
127127
'/_auth': typeof AuthRouteWithChildren
128128
'/login': typeof LoginRoute
129129
'/_auth/dashboard/': typeof AuthDashboardIndexRoute
130-
'/_auth/dashboard/deck/$deckId/': typeof AuthDashboardDeckDeckIdIndexRoute
130+
'/_auth/dashboard/card/$deckId/': typeof AuthDashboardCardDeckIdIndexRoute
131131
}
132132

133133
export interface FileRouteTypes {
134134
fileRoutesByFullPath: FileRoutesByFullPath
135-
fullPaths: '/' | '' | '/login' | '/dashboard' | '/dashboard/deck/$deckId'
135+
fullPaths: '/' | '' | '/login' | '/dashboard' | '/dashboard/card/$deckId'
136136
fileRoutesByTo: FileRoutesByTo
137-
to: '/' | '' | '/login' | '/dashboard' | '/dashboard/deck/$deckId'
137+
to: '/' | '' | '/login' | '/dashboard' | '/dashboard/card/$deckId'
138138
id:
139139
| '__root__'
140140
| '/'
141141
| '/_auth'
142142
| '/login'
143143
| '/_auth/dashboard/'
144-
| '/_auth/dashboard/deck/$deckId/'
144+
| '/_auth/dashboard/card/$deckId/'
145145
fileRoutesById: FileRoutesById
146146
}
147147

@@ -179,7 +179,7 @@ export const routeTree = rootRoute
179179
"filePath": "_auth.tsx",
180180
"children": [
181181
"/_auth/dashboard/",
182-
"/_auth/dashboard/deck/$deckId/"
182+
"/_auth/dashboard/card/$deckId/"
183183
]
184184
},
185185
"/login": {
@@ -189,8 +189,8 @@ export const routeTree = rootRoute
189189
"filePath": "_auth/dashboard/index.tsx",
190190
"parent": "/_auth"
191191
},
192-
"/_auth/dashboard/deck/$deckId/": {
193-
"filePath": "_auth/dashboard/deck/$deckId/index.tsx",
192+
"/_auth/dashboard/card/$deckId/": {
193+
"filePath": "_auth/dashboard/card/$deckId/index.tsx",
194194
"parent": "/_auth"
195195
}
196196
}

src/pods/deck/deck.pod.tsx renamed to src/pods/card/card.pod.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { useParams } from '@tanstack/react-router';
44
export const DeckPod: React.FC = () => {
55
const { deckId } = useParams({ strict: false });
66

7-
return <h1>Deck component {deckId}</h1>
7+
return <h1>Card component {deckId}</h1>
88
}

src/pods/card/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './card.pod';

src/pods/dashboard/components/dashboard.card.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const DashboardCardComponent: React.FC<Props> = (props: Props) => {
1414
const navigate = useNavigate();
1515

1616
const handleNavegate = (deckId: string) => {
17-
navigate({ to: '/dashboard/deck/$deckId', params: { deckId } })
17+
navigate({ to: '/dashboard/card/$deckId', params: { deckId } })
1818
}
1919

2020
return (

src/pods/deck/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { createFileRoute } from '@tanstack/react-router';
2+
import { DeckPod } from '#pods/card/index.ts';
3+
4+
export const Route = createFileRoute('/_auth/dashboard/card/$deckId/')({
5+
component: DeckPod,
6+
})

src/scenes/_auth/dashboard/deck/$deckId/index.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)