wcz-test 1.2.0 → 1.3.0

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/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "wcz-test",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
- "module": "dist/index.mjs",
9
8
  "types": "dist/index.d.ts",
10
9
  "files": [
11
- "dist/",
12
- "src/"
10
+ "dist"
13
11
  ],
14
12
  "publishConfig": {
15
13
  "access": "public"
package/src/api.ts DELETED
@@ -1,6 +0,0 @@
1
- import {
2
- createStartAPIHandler,
3
- defaultAPIFileRouteHandler,
4
- } from '@tanstack/react-start/api'
5
-
6
- export default createStartAPIHandler(defaultAPIFileRouteHandler)
package/src/client.tsx DELETED
@@ -1,8 +0,0 @@
1
- /// <reference types="vinxi/types/client" />
2
- import { hydrateRoot } from 'react-dom/client'
3
- import { StartClient } from '@tanstack/react-start'
4
- import { createRouter } from './router'
5
-
6
- const router = createRouter()
7
-
8
- hydrateRoot(document, <StartClient router={router} />)
@@ -1,53 +0,0 @@
1
- import {
2
- ErrorComponent,
3
- Link,
4
- rootRouteId,
5
- useMatch,
6
- useRouter,
7
- } from '@tanstack/react-router'
8
- import type { ErrorComponentProps } from '@tanstack/react-router'
9
-
10
- export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
11
- const router = useRouter()
12
- const isRoot = useMatch({
13
- strict: false,
14
- select: (state) => state.id === rootRouteId,
15
- })
16
-
17
- console.error('DefaultCatchBoundary Error:', error)
18
-
19
- return (
20
- <div className="min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6">
21
- <ErrorComponent error={error} />
22
- <div className="flex gap-2 items-center flex-wrap">
23
- <button
24
- onClick={() => {
25
- router.invalidate()
26
- }}
27
- className={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
28
- >
29
- Try Again
30
- </button>
31
- {isRoot ? (
32
- <Link
33
- to="/"
34
- className={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
35
- >
36
- Home
37
- </Link>
38
- ) : (
39
- <Link
40
- to="/"
41
- className={`px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`}
42
- onClick={(e) => {
43
- e.preventDefault()
44
- window.history.back()
45
- }}
46
- >
47
- Go Back
48
- </Link>
49
- )}
50
- </div>
51
- </div>
52
- )
53
- }
@@ -1,6 +0,0 @@
1
- import { FC } from "react";
2
-
3
- export const MyComponent: FC = () => {
4
-
5
- return <div>Moje komponenta</div>
6
- }
@@ -1,25 +0,0 @@
1
- import { Link } from '@tanstack/react-router'
2
-
3
- export function NotFound({ children }: { children?: any }) {
4
- return (
5
- <div className="space-y-2 p-2">
6
- <div className="text-gray-600 dark:text-gray-400">
7
- {children || <p>The page you are looking for does not exist.</p>}
8
- </div>
9
- <p className="flex items-center gap-2 flex-wrap">
10
- <button
11
- onClick={() => window.history.back()}
12
- className="bg-emerald-500 text-white px-2 py-1 rounded uppercase font-black text-sm"
13
- >
14
- Go back
15
- </button>
16
- <Link
17
- to="/"
18
- className="bg-cyan-600 text-white px-2 py-1 rounded uppercase font-black text-sm"
19
- >
20
- Start Over
21
- </Link>
22
- </p>
23
- </div>
24
- )
25
- }
@@ -1,5 +0,0 @@
1
- import { ErrorComponent, ErrorComponentProps } from '@tanstack/react-router'
2
-
3
- export function PostErrorComponent({ error }: ErrorComponentProps) {
4
- return <ErrorComponent error={error} />
5
- }
@@ -1,5 +0,0 @@
1
- import { ErrorComponent, ErrorComponentProps } from '@tanstack/react-router'
2
-
3
- export function UserErrorComponent({ error }: ErrorComponentProps) {
4
- return <ErrorComponent error={error} />
5
- }
@@ -1,6 +0,0 @@
1
- import { registerGlobalMiddleware } from '@tanstack/react-start'
2
- import { logMiddleware } from './utils/loggingMiddleware'
3
-
4
- registerGlobalMiddleware({
5
- middleware: [logMiddleware],
6
- })
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export { MyComponent } from "./components/MyComponent";
@@ -1,483 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // @ts-nocheck
4
-
5
- // noinspection JSUnusedGlobalSymbols
6
-
7
- // This file was automatically generated by TanStack Router.
8
- // You should NOT make any changes in this file as it will be overwritten.
9
- // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10
-
11
- // Import Routes
12
-
13
- import { Route as rootRoute } from './routes/__root'
14
- import { Route as RedirectImport } from './routes/redirect'
15
- import { Route as DeferredImport } from './routes/deferred'
16
- import { Route as PathlessLayoutImport } from './routes/_pathlessLayout'
17
- import { Route as UsersRouteImport } from './routes/users.route'
18
- import { Route as PostsRouteImport } from './routes/posts.route'
19
- import { Route as IndexImport } from './routes/index'
20
- import { Route as UsersIndexImport } from './routes/users.index'
21
- import { Route as PostsIndexImport } from './routes/posts.index'
22
- import { Route as UsersUserIdImport } from './routes/users.$userId'
23
- import { Route as PostsPostIdImport } from './routes/posts.$postId'
24
- import { Route as PathlessLayoutNestedLayoutImport } from './routes/_pathlessLayout/_nested-layout'
25
- import { Route as PostsPostIdDeepImport } from './routes/posts_.$postId.deep'
26
- import { Route as PathlessLayoutNestedLayoutRouteBImport } from './routes/_pathlessLayout/_nested-layout/route-b'
27
- import { Route as PathlessLayoutNestedLayoutRouteAImport } from './routes/_pathlessLayout/_nested-layout/route-a'
28
-
29
- // Create/Update Routes
30
-
31
- const RedirectRoute = RedirectImport.update({
32
- id: '/redirect',
33
- path: '/redirect',
34
- getParentRoute: () => rootRoute,
35
- } as any)
36
-
37
- const DeferredRoute = DeferredImport.update({
38
- id: '/deferred',
39
- path: '/deferred',
40
- getParentRoute: () => rootRoute,
41
- } as any)
42
-
43
- const PathlessLayoutRoute = PathlessLayoutImport.update({
44
- id: '/_pathlessLayout',
45
- getParentRoute: () => rootRoute,
46
- } as any)
47
-
48
- const UsersRouteRoute = UsersRouteImport.update({
49
- id: '/users',
50
- path: '/users',
51
- getParentRoute: () => rootRoute,
52
- } as any)
53
-
54
- const PostsRouteRoute = PostsRouteImport.update({
55
- id: '/posts',
56
- path: '/posts',
57
- getParentRoute: () => rootRoute,
58
- } as any)
59
-
60
- const IndexRoute = IndexImport.update({
61
- id: '/',
62
- path: '/',
63
- getParentRoute: () => rootRoute,
64
- } as any)
65
-
66
- const UsersIndexRoute = UsersIndexImport.update({
67
- id: '/',
68
- path: '/',
69
- getParentRoute: () => UsersRouteRoute,
70
- } as any)
71
-
72
- const PostsIndexRoute = PostsIndexImport.update({
73
- id: '/',
74
- path: '/',
75
- getParentRoute: () => PostsRouteRoute,
76
- } as any)
77
-
78
- const UsersUserIdRoute = UsersUserIdImport.update({
79
- id: '/$userId',
80
- path: '/$userId',
81
- getParentRoute: () => UsersRouteRoute,
82
- } as any)
83
-
84
- const PostsPostIdRoute = PostsPostIdImport.update({
85
- id: '/$postId',
86
- path: '/$postId',
87
- getParentRoute: () => PostsRouteRoute,
88
- } as any)
89
-
90
- const PathlessLayoutNestedLayoutRoute = PathlessLayoutNestedLayoutImport.update(
91
- {
92
- id: '/_nested-layout',
93
- getParentRoute: () => PathlessLayoutRoute,
94
- } as any,
95
- )
96
-
97
- const PostsPostIdDeepRoute = PostsPostIdDeepImport.update({
98
- id: '/posts_/$postId/deep',
99
- path: '/posts/$postId/deep',
100
- getParentRoute: () => rootRoute,
101
- } as any)
102
-
103
- const PathlessLayoutNestedLayoutRouteBRoute =
104
- PathlessLayoutNestedLayoutRouteBImport.update({
105
- id: '/route-b',
106
- path: '/route-b',
107
- getParentRoute: () => PathlessLayoutNestedLayoutRoute,
108
- } as any)
109
-
110
- const PathlessLayoutNestedLayoutRouteARoute =
111
- PathlessLayoutNestedLayoutRouteAImport.update({
112
- id: '/route-a',
113
- path: '/route-a',
114
- getParentRoute: () => PathlessLayoutNestedLayoutRoute,
115
- } as any)
116
-
117
- // Populate the FileRoutesByPath interface
118
-
119
- declare module '@tanstack/react-router' {
120
- interface FileRoutesByPath {
121
- '/': {
122
- id: '/'
123
- path: '/'
124
- fullPath: '/'
125
- preLoaderRoute: typeof IndexImport
126
- parentRoute: typeof rootRoute
127
- }
128
- '/posts': {
129
- id: '/posts'
130
- path: '/posts'
131
- fullPath: '/posts'
132
- preLoaderRoute: typeof PostsRouteImport
133
- parentRoute: typeof rootRoute
134
- }
135
- '/users': {
136
- id: '/users'
137
- path: '/users'
138
- fullPath: '/users'
139
- preLoaderRoute: typeof UsersRouteImport
140
- parentRoute: typeof rootRoute
141
- }
142
- '/_pathlessLayout': {
143
- id: '/_pathlessLayout'
144
- path: ''
145
- fullPath: ''
146
- preLoaderRoute: typeof PathlessLayoutImport
147
- parentRoute: typeof rootRoute
148
- }
149
- '/deferred': {
150
- id: '/deferred'
151
- path: '/deferred'
152
- fullPath: '/deferred'
153
- preLoaderRoute: typeof DeferredImport
154
- parentRoute: typeof rootRoute
155
- }
156
- '/redirect': {
157
- id: '/redirect'
158
- path: '/redirect'
159
- fullPath: '/redirect'
160
- preLoaderRoute: typeof RedirectImport
161
- parentRoute: typeof rootRoute
162
- }
163
- '/_pathlessLayout/_nested-layout': {
164
- id: '/_pathlessLayout/_nested-layout'
165
- path: ''
166
- fullPath: ''
167
- preLoaderRoute: typeof PathlessLayoutNestedLayoutImport
168
- parentRoute: typeof PathlessLayoutImport
169
- }
170
- '/posts/$postId': {
171
- id: '/posts/$postId'
172
- path: '/$postId'
173
- fullPath: '/posts/$postId'
174
- preLoaderRoute: typeof PostsPostIdImport
175
- parentRoute: typeof PostsRouteImport
176
- }
177
- '/users/$userId': {
178
- id: '/users/$userId'
179
- path: '/$userId'
180
- fullPath: '/users/$userId'
181
- preLoaderRoute: typeof UsersUserIdImport
182
- parentRoute: typeof UsersRouteImport
183
- }
184
- '/posts/': {
185
- id: '/posts/'
186
- path: '/'
187
- fullPath: '/posts/'
188
- preLoaderRoute: typeof PostsIndexImport
189
- parentRoute: typeof PostsRouteImport
190
- }
191
- '/users/': {
192
- id: '/users/'
193
- path: '/'
194
- fullPath: '/users/'
195
- preLoaderRoute: typeof UsersIndexImport
196
- parentRoute: typeof UsersRouteImport
197
- }
198
- '/_pathlessLayout/_nested-layout/route-a': {
199
- id: '/_pathlessLayout/_nested-layout/route-a'
200
- path: '/route-a'
201
- fullPath: '/route-a'
202
- preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteAImport
203
- parentRoute: typeof PathlessLayoutNestedLayoutImport
204
- }
205
- '/_pathlessLayout/_nested-layout/route-b': {
206
- id: '/_pathlessLayout/_nested-layout/route-b'
207
- path: '/route-b'
208
- fullPath: '/route-b'
209
- preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBImport
210
- parentRoute: typeof PathlessLayoutNestedLayoutImport
211
- }
212
- '/posts_/$postId/deep': {
213
- id: '/posts_/$postId/deep'
214
- path: '/posts/$postId/deep'
215
- fullPath: '/posts/$postId/deep'
216
- preLoaderRoute: typeof PostsPostIdDeepImport
217
- parentRoute: typeof rootRoute
218
- }
219
- }
220
- }
221
-
222
- // Create and export the route tree
223
-
224
- interface PostsRouteRouteChildren {
225
- PostsPostIdRoute: typeof PostsPostIdRoute
226
- PostsIndexRoute: typeof PostsIndexRoute
227
- }
228
-
229
- const PostsRouteRouteChildren: PostsRouteRouteChildren = {
230
- PostsPostIdRoute: PostsPostIdRoute,
231
- PostsIndexRoute: PostsIndexRoute,
232
- }
233
-
234
- const PostsRouteRouteWithChildren = PostsRouteRoute._addFileChildren(
235
- PostsRouteRouteChildren,
236
- )
237
-
238
- interface UsersRouteRouteChildren {
239
- UsersUserIdRoute: typeof UsersUserIdRoute
240
- UsersIndexRoute: typeof UsersIndexRoute
241
- }
242
-
243
- const UsersRouteRouteChildren: UsersRouteRouteChildren = {
244
- UsersUserIdRoute: UsersUserIdRoute,
245
- UsersIndexRoute: UsersIndexRoute,
246
- }
247
-
248
- const UsersRouteRouteWithChildren = UsersRouteRoute._addFileChildren(
249
- UsersRouteRouteChildren,
250
- )
251
-
252
- interface PathlessLayoutNestedLayoutRouteChildren {
253
- PathlessLayoutNestedLayoutRouteARoute: typeof PathlessLayoutNestedLayoutRouteARoute
254
- PathlessLayoutNestedLayoutRouteBRoute: typeof PathlessLayoutNestedLayoutRouteBRoute
255
- }
256
-
257
- const PathlessLayoutNestedLayoutRouteChildren: PathlessLayoutNestedLayoutRouteChildren =
258
- {
259
- PathlessLayoutNestedLayoutRouteARoute:
260
- PathlessLayoutNestedLayoutRouteARoute,
261
- PathlessLayoutNestedLayoutRouteBRoute:
262
- PathlessLayoutNestedLayoutRouteBRoute,
263
- }
264
-
265
- const PathlessLayoutNestedLayoutRouteWithChildren =
266
- PathlessLayoutNestedLayoutRoute._addFileChildren(
267
- PathlessLayoutNestedLayoutRouteChildren,
268
- )
269
-
270
- interface PathlessLayoutRouteChildren {
271
- PathlessLayoutNestedLayoutRoute: typeof PathlessLayoutNestedLayoutRouteWithChildren
272
- }
273
-
274
- const PathlessLayoutRouteChildren: PathlessLayoutRouteChildren = {
275
- PathlessLayoutNestedLayoutRoute: PathlessLayoutNestedLayoutRouteWithChildren,
276
- }
277
-
278
- const PathlessLayoutRouteWithChildren = PathlessLayoutRoute._addFileChildren(
279
- PathlessLayoutRouteChildren,
280
- )
281
-
282
- export interface FileRoutesByFullPath {
283
- '/': typeof IndexRoute
284
- '/posts': typeof PostsRouteRouteWithChildren
285
- '/users': typeof UsersRouteRouteWithChildren
286
- '': typeof PathlessLayoutNestedLayoutRouteWithChildren
287
- '/deferred': typeof DeferredRoute
288
- '/redirect': typeof RedirectRoute
289
- '/posts/$postId': typeof PostsPostIdRoute
290
- '/users/$userId': typeof UsersUserIdRoute
291
- '/posts/': typeof PostsIndexRoute
292
- '/users/': typeof UsersIndexRoute
293
- '/route-a': typeof PathlessLayoutNestedLayoutRouteARoute
294
- '/route-b': typeof PathlessLayoutNestedLayoutRouteBRoute
295
- '/posts/$postId/deep': typeof PostsPostIdDeepRoute
296
- }
297
-
298
- export interface FileRoutesByTo {
299
- '/': typeof IndexRoute
300
- '': typeof PathlessLayoutNestedLayoutRouteWithChildren
301
- '/deferred': typeof DeferredRoute
302
- '/redirect': typeof RedirectRoute
303
- '/posts/$postId': typeof PostsPostIdRoute
304
- '/users/$userId': typeof UsersUserIdRoute
305
- '/posts': typeof PostsIndexRoute
306
- '/users': typeof UsersIndexRoute
307
- '/route-a': typeof PathlessLayoutNestedLayoutRouteARoute
308
- '/route-b': typeof PathlessLayoutNestedLayoutRouteBRoute
309
- '/posts/$postId/deep': typeof PostsPostIdDeepRoute
310
- }
311
-
312
- export interface FileRoutesById {
313
- __root__: typeof rootRoute
314
- '/': typeof IndexRoute
315
- '/posts': typeof PostsRouteRouteWithChildren
316
- '/users': typeof UsersRouteRouteWithChildren
317
- '/_pathlessLayout': typeof PathlessLayoutRouteWithChildren
318
- '/deferred': typeof DeferredRoute
319
- '/redirect': typeof RedirectRoute
320
- '/_pathlessLayout/_nested-layout': typeof PathlessLayoutNestedLayoutRouteWithChildren
321
- '/posts/$postId': typeof PostsPostIdRoute
322
- '/users/$userId': typeof UsersUserIdRoute
323
- '/posts/': typeof PostsIndexRoute
324
- '/users/': typeof UsersIndexRoute
325
- '/_pathlessLayout/_nested-layout/route-a': typeof PathlessLayoutNestedLayoutRouteARoute
326
- '/_pathlessLayout/_nested-layout/route-b': typeof PathlessLayoutNestedLayoutRouteBRoute
327
- '/posts_/$postId/deep': typeof PostsPostIdDeepRoute
328
- }
329
-
330
- export interface FileRouteTypes {
331
- fileRoutesByFullPath: FileRoutesByFullPath
332
- fullPaths:
333
- | '/'
334
- | '/posts'
335
- | '/users'
336
- | ''
337
- | '/deferred'
338
- | '/redirect'
339
- | '/posts/$postId'
340
- | '/users/$userId'
341
- | '/posts/'
342
- | '/users/'
343
- | '/route-a'
344
- | '/route-b'
345
- | '/posts/$postId/deep'
346
- fileRoutesByTo: FileRoutesByTo
347
- to:
348
- | '/'
349
- | ''
350
- | '/deferred'
351
- | '/redirect'
352
- | '/posts/$postId'
353
- | '/users/$userId'
354
- | '/posts'
355
- | '/users'
356
- | '/route-a'
357
- | '/route-b'
358
- | '/posts/$postId/deep'
359
- id:
360
- | '__root__'
361
- | '/'
362
- | '/posts'
363
- | '/users'
364
- | '/_pathlessLayout'
365
- | '/deferred'
366
- | '/redirect'
367
- | '/_pathlessLayout/_nested-layout'
368
- | '/posts/$postId'
369
- | '/users/$userId'
370
- | '/posts/'
371
- | '/users/'
372
- | '/_pathlessLayout/_nested-layout/route-a'
373
- | '/_pathlessLayout/_nested-layout/route-b'
374
- | '/posts_/$postId/deep'
375
- fileRoutesById: FileRoutesById
376
- }
377
-
378
- export interface RootRouteChildren {
379
- IndexRoute: typeof IndexRoute
380
- PostsRouteRoute: typeof PostsRouteRouteWithChildren
381
- UsersRouteRoute: typeof UsersRouteRouteWithChildren
382
- PathlessLayoutRoute: typeof PathlessLayoutRouteWithChildren
383
- DeferredRoute: typeof DeferredRoute
384
- RedirectRoute: typeof RedirectRoute
385
- PostsPostIdDeepRoute: typeof PostsPostIdDeepRoute
386
- }
387
-
388
- const rootRouteChildren: RootRouteChildren = {
389
- IndexRoute: IndexRoute,
390
- PostsRouteRoute: PostsRouteRouteWithChildren,
391
- UsersRouteRoute: UsersRouteRouteWithChildren,
392
- PathlessLayoutRoute: PathlessLayoutRouteWithChildren,
393
- DeferredRoute: DeferredRoute,
394
- RedirectRoute: RedirectRoute,
395
- PostsPostIdDeepRoute: PostsPostIdDeepRoute,
396
- }
397
-
398
- export const routeTree = rootRoute
399
- ._addFileChildren(rootRouteChildren)
400
- ._addFileTypes<FileRouteTypes>()
401
-
402
- /* ROUTE_MANIFEST_START
403
- {
404
- "routes": {
405
- "__root__": {
406
- "filePath": "__root.tsx",
407
- "children": [
408
- "/",
409
- "/posts",
410
- "/users",
411
- "/_pathlessLayout",
412
- "/deferred",
413
- "/redirect",
414
- "/posts_/$postId/deep"
415
- ]
416
- },
417
- "/": {
418
- "filePath": "index.tsx"
419
- },
420
- "/posts": {
421
- "filePath": "posts.route.tsx",
422
- "children": [
423
- "/posts/$postId",
424
- "/posts/"
425
- ]
426
- },
427
- "/users": {
428
- "filePath": "users.route.tsx",
429
- "children": [
430
- "/users/$userId",
431
- "/users/"
432
- ]
433
- },
434
- "/_pathlessLayout": {
435
- "filePath": "_pathlessLayout.tsx",
436
- "children": [
437
- "/_pathlessLayout/_nested-layout"
438
- ]
439
- },
440
- "/deferred": {
441
- "filePath": "deferred.tsx"
442
- },
443
- "/redirect": {
444
- "filePath": "redirect.tsx"
445
- },
446
- "/_pathlessLayout/_nested-layout": {
447
- "filePath": "_pathlessLayout/_nested-layout.tsx",
448
- "parent": "/_pathlessLayout",
449
- "children": [
450
- "/_pathlessLayout/_nested-layout/route-a",
451
- "/_pathlessLayout/_nested-layout/route-b"
452
- ]
453
- },
454
- "/posts/$postId": {
455
- "filePath": "posts.$postId.tsx",
456
- "parent": "/posts"
457
- },
458
- "/users/$userId": {
459
- "filePath": "users.$userId.tsx",
460
- "parent": "/users"
461
- },
462
- "/posts/": {
463
- "filePath": "posts.index.tsx",
464
- "parent": "/posts"
465
- },
466
- "/users/": {
467
- "filePath": "users.index.tsx",
468
- "parent": "/users"
469
- },
470
- "/_pathlessLayout/_nested-layout/route-a": {
471
- "filePath": "_pathlessLayout/_nested-layout/route-a.tsx",
472
- "parent": "/_pathlessLayout/_nested-layout"
473
- },
474
- "/_pathlessLayout/_nested-layout/route-b": {
475
- "filePath": "_pathlessLayout/_nested-layout/route-b.tsx",
476
- "parent": "/_pathlessLayout/_nested-layout"
477
- },
478
- "/posts_/$postId/deep": {
479
- "filePath": "posts_.$postId.deep.tsx"
480
- }
481
- }
482
- }
483
- ROUTE_MANIFEST_END */
package/src/router.tsx DELETED
@@ -1,22 +0,0 @@
1
- import { createRouter as createTanStackRouter } from '@tanstack/react-router'
2
- import { routeTree } from './routeTree.gen'
3
- import { DefaultCatchBoundary } from './components/DefaultCatchBoundary'
4
- import { NotFound } from './components/NotFound'
5
-
6
- export function createRouter() {
7
- const router = createTanStackRouter({
8
- routeTree,
9
- defaultPreload: 'intent',
10
- defaultErrorComponent: DefaultCatchBoundary,
11
- defaultNotFoundComponent: () => <NotFound />,
12
- scrollRestoration: true,
13
- })
14
-
15
- return router
16
- }
17
-
18
- declare module '@tanstack/react-router' {
19
- interface Register {
20
- router: ReturnType<typeof createRouter>
21
- }
22
- }