Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit befdeea

Browse files
committed
_ -> /
1 parent 05ab6bd commit befdeea

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

frontend/src/routeTree.gen.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import { Route as rootRoute } from './routes/__root'
1414
import { Route as ResetCrossSigningImport } from './routes/reset-cross-signing'
1515
import { Route as AccountImport } from './routes/_account'
1616
import { Route as AccountIndexImport } from './routes/_account.index'
17-
import { Route as PasswordChangesuccessImport } from './routes/password.change_success'
18-
import { Route as PasswordChangeImport } from './routes/password.change'
1917
import { Route as DevicesSplatImport } from './routes/devices.$'
2018
import { Route as ClientsIdImport } from './routes/clients.$id'
19+
import { Route as PasswordChangeIndexImport } from './routes/password.change.index'
2120
import { Route as AccountSessionsIndexImport } from './routes/_account.sessions.index'
21+
import { Route as PasswordChangeSuccessImport } from './routes/password.change.success'
2222
import { Route as EmailsIdVerifyImport } from './routes/emails.$id.verify'
2323
import { Route as AccountSessionsBrowsersImport } from './routes/_account.sessions.browsers'
2424
import { Route as AccountSessionsIdImport } from './routes/_account.sessions.$id'
@@ -40,16 +40,6 @@ const AccountIndexRoute = AccountIndexImport.update({
4040
getParentRoute: () => AccountRoute,
4141
} as any)
4242

43-
const PasswordChangesuccessRoute = PasswordChangesuccessImport.update({
44-
path: '/password/change_success',
45-
getParentRoute: () => rootRoute,
46-
} as any)
47-
48-
const PasswordChangeRoute = PasswordChangeImport.update({
49-
path: '/password/change',
50-
getParentRoute: () => rootRoute,
51-
} as any)
52-
5343
const DevicesSplatRoute = DevicesSplatImport.update({
5444
path: '/devices/$',
5545
getParentRoute: () => rootRoute,
@@ -60,11 +50,21 @@ const ClientsIdRoute = ClientsIdImport.update({
6050
getParentRoute: () => rootRoute,
6151
} as any)
6252

53+
const PasswordChangeIndexRoute = PasswordChangeIndexImport.update({
54+
path: '/password/change/',
55+
getParentRoute: () => rootRoute,
56+
} as any)
57+
6358
const AccountSessionsIndexRoute = AccountSessionsIndexImport.update({
6459
path: '/sessions/',
6560
getParentRoute: () => AccountRoute,
6661
} as any)
6762

63+
const PasswordChangeSuccessRoute = PasswordChangeSuccessImport.update({
64+
path: '/password/change/success',
65+
getParentRoute: () => rootRoute,
66+
} as any)
67+
6868
const EmailsIdVerifyRoute = EmailsIdVerifyImport.update({
6969
path: '/emails/$id/verify',
7070
getParentRoute: () => rootRoute,
@@ -100,14 +100,6 @@ declare module '@tanstack/react-router' {
100100
preLoaderRoute: typeof DevicesSplatImport
101101
parentRoute: typeof rootRoute
102102
}
103-
'/password/change': {
104-
preLoaderRoute: typeof PasswordChangeImport
105-
parentRoute: typeof rootRoute
106-
}
107-
'/password/change_success': {
108-
preLoaderRoute: typeof PasswordChangesuccessImport
109-
parentRoute: typeof rootRoute
110-
}
111103
'/_account/': {
112104
preLoaderRoute: typeof AccountIndexImport
113105
parentRoute: typeof AccountImport
@@ -124,10 +116,18 @@ declare module '@tanstack/react-router' {
124116
preLoaderRoute: typeof EmailsIdVerifyImport
125117
parentRoute: typeof rootRoute
126118
}
119+
'/password/change/success': {
120+
preLoaderRoute: typeof PasswordChangeSuccessImport
121+
parentRoute: typeof rootRoute
122+
}
127123
'/_account/sessions/': {
128124
preLoaderRoute: typeof AccountSessionsIndexImport
129125
parentRoute: typeof AccountImport
130126
}
127+
'/password/change/': {
128+
preLoaderRoute: typeof PasswordChangeIndexImport
129+
parentRoute: typeof rootRoute
130+
}
131131
}
132132
}
133133

@@ -143,9 +143,9 @@ export const routeTree = rootRoute.addChildren([
143143
ResetCrossSigningRoute,
144144
ClientsIdRoute,
145145
DevicesSplatRoute,
146-
PasswordChangeRoute,
147-
PasswordChangesuccessRoute,
148146
EmailsIdVerifyRoute,
147+
PasswordChangeSuccessRoute,
148+
PasswordChangeIndexRoute,
149149
])
150150

151151
/* prettier-ignore-end */

frontend/src/routes/password.change.tsx renamed to frontend/src/routes/password.change.index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const CHANGE_PASSWORD_MUTATION = graphql(/* GraphQL */ `
5757
}
5858
`);
5959

60-
export const Route = createFileRoute("/password/change")({
60+
export const Route = createFileRoute("/password/change/")({
6161
async loader({ context, abortController: { signal } }) {
6262
const viewer = await context.client.query(
6363
CURRENT_VIEWER_QUERY,
@@ -101,7 +101,7 @@ function ChangePassword(): React.ReactNode {
101101
const response = await changePassword({ userId, oldPassword, newPassword });
102102

103103
if (response.data?.setPassword.status === SetPasswordStatus.Allowed) {
104-
router.navigate({ to: "/password/change_success" });
104+
router.navigate({ to: "/password/change/success" });
105105
}
106106
};
107107

frontend/src/routes/password.change_success.tsx renamed to frontend/src/routes/password.change.success.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const CURRENT_VIEWER_QUERY = graphql(/* GraphQL */ `
3535
}
3636
`);
3737

38-
export const Route = createFileRoute("/password/change_success")({
38+
export const Route = createFileRoute("/password/change/success")({
3939
async loader({ context, abortController: { signal } }) {
4040
const viewer = await context.client.query(
4141
CURRENT_VIEWER_QUERY,

0 commit comments

Comments
 (0)