generator-kodly-react-app 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/app/index.js +4 -0
- package/generators/app/templates/I18N_MIGRATION.md +13 -13
- package/generators/app/templates/STRUCTURE.md +26 -26
- package/generators/app/templates/index.html +6 -14
- package/generators/app/templates/openapi-ts.config.ts +12 -12
- package/generators/app/templates/postcss.config.js +0 -1
- package/generators/app/templates/src/app.tsx +20 -20
- package/generators/app/templates/src/components/layout/language-switcher.tsx +20 -16
- package/generators/app/templates/src/components/layout/page-layout.tsx +31 -0
- package/generators/app/templates/src/components/layout/theme-switcher.tsx +15 -14
- package/generators/app/templates/src/components/theme/theme-provider.tsx +20 -13
- package/generators/app/templates/src/components/ui/button.tsx +15 -14
- package/generators/app/templates/src/components/ui/card.tsx +23 -16
- package/generators/app/templates/src/components/ui/field.tsx +35 -35
- package/generators/app/templates/src/components/ui/form.tsx +66 -30
- package/generators/app/templates/src/components/ui/input-group.tsx +24 -24
- package/generators/app/templates/src/components/ui/input.tsx +8 -8
- package/generators/app/templates/src/components/ui/label.tsx +9 -9
- package/generators/app/templates/src/components/ui/select.tsx +0 -1
- package/generators/app/templates/src/components/ui/separator.tsx +10 -10
- package/generators/app/templates/src/components/ui/textarea.tsx +7 -7
- package/generators/app/templates/src/index.css +12 -2
- package/generators/app/templates/src/lib/i18n.ts +16 -14
- package/generators/app/templates/src/lib/routes.ts +2 -3
- package/generators/app/templates/src/lib/utils/error-handler.ts +21 -14
- package/generators/app/templates/src/lib/utils.ts +3 -3
- package/generators/app/templates/src/locales/index.ts +12 -12
- package/generators/app/templates/src/locales/ja/theme.json +0 -1
- package/generators/app/templates/src/main.tsx +10 -12
- package/generators/app/templates/src/modules/app/layouts/app-layout.tsx +14 -25
- package/generators/app/templates/src/modules/app/locales/app-en.json +0 -1
- package/generators/app/templates/src/modules/app/locales/app-ja.json +0 -1
- package/generators/app/templates/src/modules/auth/components/auth-form.tsx +83 -0
- package/generators/app/templates/src/modules/auth/components/forgot-password-form.tsx +27 -52
- package/generators/app/templates/src/modules/auth/components/login-form.tsx +42 -72
- package/generators/app/templates/src/modules/auth/components/login-link.tsx +12 -0
- package/generators/app/templates/src/modules/auth/components/reset-password-form.tsx +46 -92
- package/generators/app/templates/src/modules/auth/components/signup-form.tsx +35 -71
- package/generators/app/templates/src/modules/auth/contexts/auth-context.tsx +10 -6
- package/generators/app/templates/src/modules/auth/hooks/use-auth-hook.ts +51 -36
- package/generators/app/templates/src/modules/auth/layouts/auth-layout.tsx +12 -15
- package/generators/app/templates/src/modules/auth/locales/auth-en.json +0 -1
- package/generators/app/templates/src/modules/auth/locales/auth-ja.json +0 -1
- package/generators/app/templates/src/modules/auth/schemas/form-schemas.ts +14 -10
- package/generators/app/templates/src/modules/landing/components/auth-hero.tsx +20 -18
- package/generators/app/templates/src/modules/landing/components/welcome-hero.tsx +13 -11
- package/generators/app/templates/src/modules/landing/landing-page-layout.tsx +1 -24
- package/generators/app/templates/src/modules/landing/landing-page.tsx +11 -6
- package/generators/app/templates/src/modules/landing/layouts/landing-page-layout.tsx +2 -21
- package/generators/app/templates/src/modules/landing/locales/landing-en.json +0 -1
- package/generators/app/templates/src/openapi-client-config.ts +1 -1
- package/generators/app/templates/src/routeTree.gen.ts +188 -188
- package/generators/app/templates/src/router.tsx +2 -2
- package/generators/app/templates/src/routes/$.tsx +0 -1
- package/generators/app/templates/src/routes/__root.tsx +2 -2
- package/generators/app/templates/src/routes/_landing/index.tsx +3 -3
- package/generators/app/templates/src/routes/_landing/route.tsx +3 -3
- package/generators/app/templates/src/routes/app/index.tsx +6 -6
- package/generators/app/templates/src/routes/app/route.tsx +4 -4
- package/generators/app/templates/src/routes/auth/forgot-password.tsx +1 -1
- package/generators/app/templates/src/routes/auth/login.tsx +3 -3
- package/generators/app/templates/src/routes/auth/reset-password.tsx +3 -3
- package/generators/app/templates/src/routes/auth/route.tsx +12 -7
- package/generators/app/templates/src/routes/auth/signup.tsx +1 -2
- package/generators/app/templates/src/sdk/@tanstack/react-query.gen.ts +157 -76
- package/generators/app/templates/src/sdk/client/client.gen.ts +35 -37
- package/generators/app/templates/src/sdk/client/index.ts +8 -8
- package/generators/app/templates/src/sdk/client/types.gen.ts +22 -19
- package/generators/app/templates/src/sdk/client/utils.gen.ts +53 -45
- package/generators/app/templates/src/sdk/client.gen.ts +18 -5
- package/generators/app/templates/src/sdk/core/auth.gen.ts +6 -6
- package/generators/app/templates/src/sdk/core/bodySerializer.gen.ts +25 -27
- package/generators/app/templates/src/sdk/core/params.gen.ts +12 -12
- package/generators/app/templates/src/sdk/core/pathSerializer.gen.ts +40 -41
- package/generators/app/templates/src/sdk/core/queryKeySerializer.gen.ts +12 -29
- package/generators/app/templates/src/sdk/core/serverSentEvents.gen.ts +26 -24
- package/generators/app/templates/src/sdk/core/types.gen.ts +17 -15
- package/generators/app/templates/src/sdk/core/utils.gen.ts +18 -18
- package/generators/app/templates/src/sdk/index.ts +40 -2
- package/generators/app/templates/src/sdk/schemas.gen.ts +108 -166
- package/generators/app/templates/src/sdk/sdk.gen.ts +145 -63
- package/generators/app/templates/src/sdk/types.gen.ts +90 -84
- package/generators/app/templates/src/sdk/zod.gen.ts +57 -74
- package/generators/app/templates/src/types/i18n.d.ts +0 -1
- package/generators/app/templates/tailwind.config.js +0 -1
- package/generators/app/templates/tsconfig.app.json +0 -1
- package/generators/app/templates/tsconfig.json +0 -1
- package/generators/app/templates/tsr.config.json +4 -0
- package/generators/app/templates/vite.config.js +12 -12
- package/package.json +2 -4
|
@@ -8,249 +8,249 @@
|
|
|
8
8
|
// You should NOT make any changes in this file as it will be overwritten.
|
|
9
9
|
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
10
10
|
|
|
11
|
-
import { Route as rootRouteImport } from
|
|
12
|
-
import { Route as SplatRouteImport } from
|
|
13
|
-
import { Route as AuthRouteRouteImport } from
|
|
14
|
-
import { Route as AppRouteRouteImport } from
|
|
15
|
-
import { Route as LandingRouteRouteImport } from
|
|
16
|
-
import { Route as AppIndexRouteImport } from
|
|
17
|
-
import { Route as LandingIndexRouteImport } from
|
|
18
|
-
import { Route as AuthSignupRouteImport } from
|
|
19
|
-
import { Route as AuthResetPasswordRouteImport } from
|
|
20
|
-
import { Route as AuthLoginRouteImport } from
|
|
21
|
-
import { Route as AuthForgotPasswordRouteImport } from
|
|
11
|
+
import { Route as rootRouteImport } from "./routes/__root";
|
|
12
|
+
import { Route as SplatRouteImport } from "./routes/$";
|
|
13
|
+
import { Route as AuthRouteRouteImport } from "./routes/auth/route";
|
|
14
|
+
import { Route as AppRouteRouteImport } from "./routes/app/route";
|
|
15
|
+
import { Route as LandingRouteRouteImport } from "./routes/_landing/route";
|
|
16
|
+
import { Route as AppIndexRouteImport } from "./routes/app/index";
|
|
17
|
+
import { Route as LandingIndexRouteImport } from "./routes/_landing/index";
|
|
18
|
+
import { Route as AuthSignupRouteImport } from "./routes/auth/signup";
|
|
19
|
+
import { Route as AuthResetPasswordRouteImport } from "./routes/auth/reset-password";
|
|
20
|
+
import { Route as AuthLoginRouteImport } from "./routes/auth/login";
|
|
21
|
+
import { Route as AuthForgotPasswordRouteImport } from "./routes/auth/forgot-password";
|
|
22
22
|
|
|
23
23
|
const SplatRoute = SplatRouteImport.update({
|
|
24
|
-
id:
|
|
25
|
-
path:
|
|
24
|
+
id: "/$",
|
|
25
|
+
path: "/$",
|
|
26
26
|
getParentRoute: () => rootRouteImport,
|
|
27
|
-
} as any)
|
|
27
|
+
} as any);
|
|
28
28
|
const AuthRouteRoute = AuthRouteRouteImport.update({
|
|
29
|
-
id:
|
|
30
|
-
path:
|
|
29
|
+
id: "/auth",
|
|
30
|
+
path: "/auth",
|
|
31
31
|
getParentRoute: () => rootRouteImport,
|
|
32
|
-
} as any)
|
|
32
|
+
} as any);
|
|
33
33
|
const AppRouteRoute = AppRouteRouteImport.update({
|
|
34
|
-
id:
|
|
35
|
-
path:
|
|
34
|
+
id: "/app",
|
|
35
|
+
path: "/app",
|
|
36
36
|
getParentRoute: () => rootRouteImport,
|
|
37
|
-
} as any)
|
|
37
|
+
} as any);
|
|
38
38
|
const LandingRouteRoute = LandingRouteRouteImport.update({
|
|
39
|
-
id:
|
|
39
|
+
id: "/_landing",
|
|
40
40
|
getParentRoute: () => rootRouteImport,
|
|
41
|
-
} as any)
|
|
41
|
+
} as any);
|
|
42
42
|
const AppIndexRoute = AppIndexRouteImport.update({
|
|
43
|
-
id:
|
|
44
|
-
path:
|
|
43
|
+
id: "/",
|
|
44
|
+
path: "/",
|
|
45
45
|
getParentRoute: () => AppRouteRoute,
|
|
46
|
-
} as any)
|
|
46
|
+
} as any);
|
|
47
47
|
const LandingIndexRoute = LandingIndexRouteImport.update({
|
|
48
|
-
id:
|
|
49
|
-
path:
|
|
48
|
+
id: "/",
|
|
49
|
+
path: "/",
|
|
50
50
|
getParentRoute: () => LandingRouteRoute,
|
|
51
|
-
} as any)
|
|
51
|
+
} as any);
|
|
52
52
|
const AuthSignupRoute = AuthSignupRouteImport.update({
|
|
53
|
-
id:
|
|
54
|
-
path:
|
|
53
|
+
id: "/signup",
|
|
54
|
+
path: "/signup",
|
|
55
55
|
getParentRoute: () => AuthRouteRoute,
|
|
56
|
-
} as any)
|
|
56
|
+
} as any);
|
|
57
57
|
const AuthResetPasswordRoute = AuthResetPasswordRouteImport.update({
|
|
58
|
-
id:
|
|
59
|
-
path:
|
|
58
|
+
id: "/reset-password",
|
|
59
|
+
path: "/reset-password",
|
|
60
60
|
getParentRoute: () => AuthRouteRoute,
|
|
61
|
-
} as any)
|
|
61
|
+
} as any);
|
|
62
62
|
const AuthLoginRoute = AuthLoginRouteImport.update({
|
|
63
|
-
id:
|
|
64
|
-
path:
|
|
63
|
+
id: "/login",
|
|
64
|
+
path: "/login",
|
|
65
65
|
getParentRoute: () => AuthRouteRoute,
|
|
66
|
-
} as any)
|
|
66
|
+
} as any);
|
|
67
67
|
const AuthForgotPasswordRoute = AuthForgotPasswordRouteImport.update({
|
|
68
|
-
id:
|
|
69
|
-
path:
|
|
68
|
+
id: "/forgot-password",
|
|
69
|
+
path: "/forgot-password",
|
|
70
70
|
getParentRoute: () => AuthRouteRoute,
|
|
71
|
-
} as any)
|
|
71
|
+
} as any);
|
|
72
72
|
|
|
73
73
|
export interface FileRoutesByFullPath {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
"/app": typeof AppRouteRouteWithChildren;
|
|
75
|
+
"/auth": typeof AuthRouteRouteWithChildren;
|
|
76
|
+
"/$": typeof SplatRoute;
|
|
77
|
+
"/auth/forgot-password": typeof AuthForgotPasswordRoute;
|
|
78
|
+
"/auth/login": typeof AuthLoginRoute;
|
|
79
|
+
"/auth/reset-password": typeof AuthResetPasswordRoute;
|
|
80
|
+
"/auth/signup": typeof AuthSignupRoute;
|
|
81
|
+
"/": typeof LandingIndexRoute;
|
|
82
|
+
"/app/": typeof AppIndexRoute;
|
|
83
83
|
}
|
|
84
84
|
export interface FileRoutesByTo {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
"/auth": typeof AuthRouteRouteWithChildren;
|
|
86
|
+
"/$": typeof SplatRoute;
|
|
87
|
+
"/auth/forgot-password": typeof AuthForgotPasswordRoute;
|
|
88
|
+
"/auth/login": typeof AuthLoginRoute;
|
|
89
|
+
"/auth/reset-password": typeof AuthResetPasswordRoute;
|
|
90
|
+
"/auth/signup": typeof AuthSignupRoute;
|
|
91
|
+
"/": typeof LandingIndexRoute;
|
|
92
|
+
"/app": typeof AppIndexRoute;
|
|
93
93
|
}
|
|
94
94
|
export interface FileRoutesById {
|
|
95
|
-
__root__: typeof rootRouteImport
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
__root__: typeof rootRouteImport;
|
|
96
|
+
"/_landing": typeof LandingRouteRouteWithChildren;
|
|
97
|
+
"/app": typeof AppRouteRouteWithChildren;
|
|
98
|
+
"/auth": typeof AuthRouteRouteWithChildren;
|
|
99
|
+
"/$": typeof SplatRoute;
|
|
100
|
+
"/auth/forgot-password": typeof AuthForgotPasswordRoute;
|
|
101
|
+
"/auth/login": typeof AuthLoginRoute;
|
|
102
|
+
"/auth/reset-password": typeof AuthResetPasswordRoute;
|
|
103
|
+
"/auth/signup": typeof AuthSignupRoute;
|
|
104
|
+
"/_landing/": typeof LandingIndexRoute;
|
|
105
|
+
"/app/": typeof AppIndexRoute;
|
|
106
106
|
}
|
|
107
107
|
export interface FileRouteTypes {
|
|
108
|
-
fileRoutesByFullPath: FileRoutesByFullPath
|
|
108
|
+
fileRoutesByFullPath: FileRoutesByFullPath;
|
|
109
109
|
fullPaths:
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
fileRoutesByTo: FileRoutesByTo
|
|
110
|
+
| "/app"
|
|
111
|
+
| "/auth"
|
|
112
|
+
| "/$"
|
|
113
|
+
| "/auth/forgot-password"
|
|
114
|
+
| "/auth/login"
|
|
115
|
+
| "/auth/reset-password"
|
|
116
|
+
| "/auth/signup"
|
|
117
|
+
| "/"
|
|
118
|
+
| "/app/";
|
|
119
|
+
fileRoutesByTo: FileRoutesByTo;
|
|
120
120
|
to:
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
121
|
+
| "/auth"
|
|
122
|
+
| "/$"
|
|
123
|
+
| "/auth/forgot-password"
|
|
124
|
+
| "/auth/login"
|
|
125
|
+
| "/auth/reset-password"
|
|
126
|
+
| "/auth/signup"
|
|
127
|
+
| "/"
|
|
128
|
+
| "/app";
|
|
129
129
|
id:
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
fileRoutesById: FileRoutesById
|
|
130
|
+
| "__root__"
|
|
131
|
+
| "/_landing"
|
|
132
|
+
| "/app"
|
|
133
|
+
| "/auth"
|
|
134
|
+
| "/$"
|
|
135
|
+
| "/auth/forgot-password"
|
|
136
|
+
| "/auth/login"
|
|
137
|
+
| "/auth/reset-password"
|
|
138
|
+
| "/auth/signup"
|
|
139
|
+
| "/_landing/"
|
|
140
|
+
| "/app/";
|
|
141
|
+
fileRoutesById: FileRoutesById;
|
|
142
142
|
}
|
|
143
143
|
export interface RootRouteChildren {
|
|
144
|
-
LandingRouteRoute: typeof LandingRouteRouteWithChildren
|
|
145
|
-
AppRouteRoute: typeof AppRouteRouteWithChildren
|
|
146
|
-
AuthRouteRoute: typeof AuthRouteRouteWithChildren
|
|
147
|
-
SplatRoute: typeof SplatRoute
|
|
144
|
+
LandingRouteRoute: typeof LandingRouteRouteWithChildren;
|
|
145
|
+
AppRouteRoute: typeof AppRouteRouteWithChildren;
|
|
146
|
+
AuthRouteRoute: typeof AuthRouteRouteWithChildren;
|
|
147
|
+
SplatRoute: typeof SplatRoute;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
declare module
|
|
150
|
+
declare module "@tanstack/react-router" {
|
|
151
151
|
interface FileRoutesByPath {
|
|
152
|
-
|
|
153
|
-
id:
|
|
154
|
-
path:
|
|
155
|
-
fullPath:
|
|
156
|
-
preLoaderRoute: typeof SplatRouteImport
|
|
157
|
-
parentRoute: typeof rootRouteImport
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
id:
|
|
161
|
-
path:
|
|
162
|
-
fullPath:
|
|
163
|
-
preLoaderRoute: typeof AuthRouteRouteImport
|
|
164
|
-
parentRoute: typeof rootRouteImport
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
id:
|
|
168
|
-
path:
|
|
169
|
-
fullPath:
|
|
170
|
-
preLoaderRoute: typeof AppRouteRouteImport
|
|
171
|
-
parentRoute: typeof rootRouteImport
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
id:
|
|
175
|
-
path:
|
|
176
|
-
fullPath:
|
|
177
|
-
preLoaderRoute: typeof LandingRouteRouteImport
|
|
178
|
-
parentRoute: typeof rootRouteImport
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
id:
|
|
182
|
-
path:
|
|
183
|
-
fullPath:
|
|
184
|
-
preLoaderRoute: typeof AppIndexRouteImport
|
|
185
|
-
parentRoute: typeof AppRouteRoute
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
id:
|
|
189
|
-
path:
|
|
190
|
-
fullPath:
|
|
191
|
-
preLoaderRoute: typeof LandingIndexRouteImport
|
|
192
|
-
parentRoute: typeof LandingRouteRoute
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
id:
|
|
196
|
-
path:
|
|
197
|
-
fullPath:
|
|
198
|
-
preLoaderRoute: typeof AuthSignupRouteImport
|
|
199
|
-
parentRoute: typeof AuthRouteRoute
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
id:
|
|
203
|
-
path:
|
|
204
|
-
fullPath:
|
|
205
|
-
preLoaderRoute: typeof AuthResetPasswordRouteImport
|
|
206
|
-
parentRoute: typeof AuthRouteRoute
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
id:
|
|
210
|
-
path:
|
|
211
|
-
fullPath:
|
|
212
|
-
preLoaderRoute: typeof AuthLoginRouteImport
|
|
213
|
-
parentRoute: typeof AuthRouteRoute
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
id:
|
|
217
|
-
path:
|
|
218
|
-
fullPath:
|
|
219
|
-
preLoaderRoute: typeof AuthForgotPasswordRouteImport
|
|
220
|
-
parentRoute: typeof AuthRouteRoute
|
|
221
|
-
}
|
|
152
|
+
"/$": {
|
|
153
|
+
id: "/$";
|
|
154
|
+
path: "/$";
|
|
155
|
+
fullPath: "/$";
|
|
156
|
+
preLoaderRoute: typeof SplatRouteImport;
|
|
157
|
+
parentRoute: typeof rootRouteImport;
|
|
158
|
+
};
|
|
159
|
+
"/auth": {
|
|
160
|
+
id: "/auth";
|
|
161
|
+
path: "/auth";
|
|
162
|
+
fullPath: "/auth";
|
|
163
|
+
preLoaderRoute: typeof AuthRouteRouteImport;
|
|
164
|
+
parentRoute: typeof rootRouteImport;
|
|
165
|
+
};
|
|
166
|
+
"/app": {
|
|
167
|
+
id: "/app";
|
|
168
|
+
path: "/app";
|
|
169
|
+
fullPath: "/app";
|
|
170
|
+
preLoaderRoute: typeof AppRouteRouteImport;
|
|
171
|
+
parentRoute: typeof rootRouteImport;
|
|
172
|
+
};
|
|
173
|
+
"/_landing": {
|
|
174
|
+
id: "/_landing";
|
|
175
|
+
path: "";
|
|
176
|
+
fullPath: "";
|
|
177
|
+
preLoaderRoute: typeof LandingRouteRouteImport;
|
|
178
|
+
parentRoute: typeof rootRouteImport;
|
|
179
|
+
};
|
|
180
|
+
"/app/": {
|
|
181
|
+
id: "/app/";
|
|
182
|
+
path: "/";
|
|
183
|
+
fullPath: "/app/";
|
|
184
|
+
preLoaderRoute: typeof AppIndexRouteImport;
|
|
185
|
+
parentRoute: typeof AppRouteRoute;
|
|
186
|
+
};
|
|
187
|
+
"/_landing/": {
|
|
188
|
+
id: "/_landing/";
|
|
189
|
+
path: "/";
|
|
190
|
+
fullPath: "/";
|
|
191
|
+
preLoaderRoute: typeof LandingIndexRouteImport;
|
|
192
|
+
parentRoute: typeof LandingRouteRoute;
|
|
193
|
+
};
|
|
194
|
+
"/auth/signup": {
|
|
195
|
+
id: "/auth/signup";
|
|
196
|
+
path: "/signup";
|
|
197
|
+
fullPath: "/auth/signup";
|
|
198
|
+
preLoaderRoute: typeof AuthSignupRouteImport;
|
|
199
|
+
parentRoute: typeof AuthRouteRoute;
|
|
200
|
+
};
|
|
201
|
+
"/auth/reset-password": {
|
|
202
|
+
id: "/auth/reset-password";
|
|
203
|
+
path: "/reset-password";
|
|
204
|
+
fullPath: "/auth/reset-password";
|
|
205
|
+
preLoaderRoute: typeof AuthResetPasswordRouteImport;
|
|
206
|
+
parentRoute: typeof AuthRouteRoute;
|
|
207
|
+
};
|
|
208
|
+
"/auth/login": {
|
|
209
|
+
id: "/auth/login";
|
|
210
|
+
path: "/login";
|
|
211
|
+
fullPath: "/auth/login";
|
|
212
|
+
preLoaderRoute: typeof AuthLoginRouteImport;
|
|
213
|
+
parentRoute: typeof AuthRouteRoute;
|
|
214
|
+
};
|
|
215
|
+
"/auth/forgot-password": {
|
|
216
|
+
id: "/auth/forgot-password";
|
|
217
|
+
path: "/forgot-password";
|
|
218
|
+
fullPath: "/auth/forgot-password";
|
|
219
|
+
preLoaderRoute: typeof AuthForgotPasswordRouteImport;
|
|
220
|
+
parentRoute: typeof AuthRouteRoute;
|
|
221
|
+
};
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
interface LandingRouteRouteChildren {
|
|
226
|
-
LandingIndexRoute: typeof LandingIndexRoute
|
|
226
|
+
LandingIndexRoute: typeof LandingIndexRoute;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
const LandingRouteRouteChildren: LandingRouteRouteChildren = {
|
|
230
230
|
LandingIndexRoute: LandingIndexRoute,
|
|
231
|
-
}
|
|
231
|
+
};
|
|
232
232
|
|
|
233
233
|
const LandingRouteRouteWithChildren = LandingRouteRoute._addFileChildren(
|
|
234
234
|
LandingRouteRouteChildren,
|
|
235
|
-
)
|
|
235
|
+
);
|
|
236
236
|
|
|
237
237
|
interface AppRouteRouteChildren {
|
|
238
|
-
AppIndexRoute: typeof AppIndexRoute
|
|
238
|
+
AppIndexRoute: typeof AppIndexRoute;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
const AppRouteRouteChildren: AppRouteRouteChildren = {
|
|
242
242
|
AppIndexRoute: AppIndexRoute,
|
|
243
|
-
}
|
|
243
|
+
};
|
|
244
244
|
|
|
245
245
|
const AppRouteRouteWithChildren = AppRouteRoute._addFileChildren(
|
|
246
246
|
AppRouteRouteChildren,
|
|
247
|
-
)
|
|
247
|
+
);
|
|
248
248
|
|
|
249
249
|
interface AuthRouteRouteChildren {
|
|
250
|
-
AuthForgotPasswordRoute: typeof AuthForgotPasswordRoute
|
|
251
|
-
AuthLoginRoute: typeof AuthLoginRoute
|
|
252
|
-
AuthResetPasswordRoute: typeof AuthResetPasswordRoute
|
|
253
|
-
AuthSignupRoute: typeof AuthSignupRoute
|
|
250
|
+
AuthForgotPasswordRoute: typeof AuthForgotPasswordRoute;
|
|
251
|
+
AuthLoginRoute: typeof AuthLoginRoute;
|
|
252
|
+
AuthResetPasswordRoute: typeof AuthResetPasswordRoute;
|
|
253
|
+
AuthSignupRoute: typeof AuthSignupRoute;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
const AuthRouteRouteChildren: AuthRouteRouteChildren = {
|
|
@@ -258,18 +258,18 @@ const AuthRouteRouteChildren: AuthRouteRouteChildren = {
|
|
|
258
258
|
AuthLoginRoute: AuthLoginRoute,
|
|
259
259
|
AuthResetPasswordRoute: AuthResetPasswordRoute,
|
|
260
260
|
AuthSignupRoute: AuthSignupRoute,
|
|
261
|
-
}
|
|
261
|
+
};
|
|
262
262
|
|
|
263
263
|
const AuthRouteRouteWithChildren = AuthRouteRoute._addFileChildren(
|
|
264
264
|
AuthRouteRouteChildren,
|
|
265
|
-
)
|
|
265
|
+
);
|
|
266
266
|
|
|
267
267
|
const rootRouteChildren: RootRouteChildren = {
|
|
268
268
|
LandingRouteRoute: LandingRouteRouteWithChildren,
|
|
269
269
|
AppRouteRoute: AppRouteRouteWithChildren,
|
|
270
270
|
AuthRouteRoute: AuthRouteRouteWithChildren,
|
|
271
271
|
SplatRoute: SplatRoute,
|
|
272
|
-
}
|
|
272
|
+
};
|
|
273
273
|
export const routeTree = rootRouteImport
|
|
274
274
|
._addFileChildren(rootRouteChildren)
|
|
275
|
-
._addFileTypes<FileRouteTypes>()
|
|
275
|
+
._addFileTypes<FileRouteTypes>();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createRouter } from
|
|
2
|
-
import { routeTree } from
|
|
1
|
+
import { createRouter } from "@tanstack/react-router";
|
|
2
|
+
import { routeTree } from "@/routeTree.gen";
|
|
3
3
|
|
|
4
4
|
export const router = createRouter({
|
|
5
5
|
basepath: import.meta.env.BASE_URL,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Outlet, createRootRouteWithContext } from
|
|
2
|
-
import type { AuthResponseDtoUserDetailDto } from
|
|
1
|
+
import { Outlet, createRootRouteWithContext } from "@tanstack/react-router";
|
|
2
|
+
import type { AuthResponseDtoUserDetailDto } from "@/sdk";
|
|
3
3
|
|
|
4
4
|
interface RouterContext {
|
|
5
5
|
token: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createFileRoute } from
|
|
2
|
-
import { LandingPage } from
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
+
import { LandingPage } from "@/modules/landing/landing-page";
|
|
3
3
|
|
|
4
|
-
export const Route = createFileRoute(
|
|
4
|
+
export const Route = createFileRoute("/_landing/")({
|
|
5
5
|
component: RouteComponent,
|
|
6
6
|
});
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LandingPageLayout } from
|
|
2
|
-
import { createFileRoute, Outlet } from
|
|
1
|
+
import { LandingPageLayout } from "@/modules/landing/layouts/landing-page-layout";
|
|
2
|
+
import { createFileRoute, Outlet } from "@tanstack/react-router";
|
|
3
3
|
|
|
4
|
-
export const Route = createFileRoute(
|
|
4
|
+
export const Route = createFileRoute("/_landing")({
|
|
5
5
|
component: RouteComponent,
|
|
6
6
|
});
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createFileRoute } from
|
|
2
|
-
import { useTranslation } from
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
3
|
|
|
4
|
-
export const Route = createFileRoute(
|
|
4
|
+
export const Route = createFileRoute("/app/")({
|
|
5
5
|
component: AppIndex,
|
|
6
6
|
});
|
|
7
7
|
|
|
@@ -9,10 +9,10 @@ function AppIndex() {
|
|
|
9
9
|
const { t } = useTranslation();
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<div className=
|
|
12
|
+
<div className="flex flex-col gap-6">
|
|
13
13
|
<div>
|
|
14
|
-
<h1 className=
|
|
15
|
-
<p className=
|
|
14
|
+
<h1 className="text-3xl font-bold mb-4">{t("app.welcome.title")}</h1>
|
|
15
|
+
<p className="text-muted-foreground">{t("app.welcome.message")}</p>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createFileRoute, Outlet, redirect } from
|
|
2
|
-
import { AppLayout } from
|
|
3
|
-
import { DEFAULT_NON_LOGGED_IN_ROUTE } from
|
|
1
|
+
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
|
|
2
|
+
import { AppLayout } from "@/modules/app/layouts/app-layout";
|
|
3
|
+
import { DEFAULT_NON_LOGGED_IN_ROUTE } from "@/lib/routes";
|
|
4
4
|
|
|
5
|
-
export const Route = createFileRoute(
|
|
5
|
+
export const Route = createFileRoute("/app")({
|
|
6
6
|
beforeLoad: ({ context }) => {
|
|
7
7
|
if (!context.token) {
|
|
8
8
|
throw redirect({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
-
import { ForgotPasswordForm } from
|
|
2
|
+
import { ForgotPasswordForm } from "@/modules/auth/components/forgot-password-form";
|
|
3
3
|
|
|
4
4
|
export const Route = createFileRoute("/auth/forgot-password")({
|
|
5
5
|
component: RouteComponent,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createFileRoute } from
|
|
2
|
-
import { LoginForm } from
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
+
import { LoginForm } from "@/modules/auth/components/login-form";
|
|
3
3
|
|
|
4
|
-
export const Route = createFileRoute(
|
|
4
|
+
export const Route = createFileRoute("/auth/login")({
|
|
5
5
|
component: RouteComponent,
|
|
6
6
|
});
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createFileRoute } from
|
|
2
|
-
import { ResetPasswordForm } from
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
+
import { ResetPasswordForm } from "@/modules/auth/components/reset-password-form";
|
|
3
3
|
|
|
4
|
-
export const Route = createFileRoute(
|
|
4
|
+
export const Route = createFileRoute("/auth/reset-password")({
|
|
5
5
|
component: RouteComponent,
|
|
6
6
|
validateSearch: (search: Record<string, unknown>) => {
|
|
7
7
|
return {
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
createFileRoute,
|
|
3
|
+
Outlet,
|
|
4
|
+
redirect,
|
|
5
|
+
useNavigate,
|
|
6
|
+
} from "@tanstack/react-router";
|
|
7
|
+
import { AuthLayout } from "@/modules/auth/layouts/auth-layout";
|
|
8
|
+
import { DEFAULT_LOGGED_IN_ROUTE } from "@/lib/routes";
|
|
9
|
+
import { useAtomValue } from "jotai";
|
|
10
|
+
import { authTokenAtom } from "@/modules/auth/hooks/use-auth-hook";
|
|
11
|
+
import { useEffect } from "react";
|
|
7
12
|
|
|
8
|
-
export const Route = createFileRoute(
|
|
13
|
+
export const Route = createFileRoute("/auth")({
|
|
9
14
|
component: RouteComponent,
|
|
10
15
|
beforeLoad: ({ context }) => {
|
|
11
16
|
if (context.token) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
-
import { SignupForm } from
|
|
2
|
+
import { SignupForm } from "@/modules/auth/components/signup-form";
|
|
3
3
|
|
|
4
4
|
export const Route = createFileRoute("/auth/signup")({
|
|
5
5
|
component: RouteComponent,
|
|
@@ -8,4 +8,3 @@ export const Route = createFileRoute("/auth/signup")({
|
|
|
8
8
|
function RouteComponent() {
|
|
9
9
|
return <SignupForm />;
|
|
10
10
|
}
|
|
11
|
-
|