tangled
alpha
login
or
join now
isuggest.selfce.st
/
strand
3
fork
atom
alternative tangled frontend (extremely wip)
3
fork
atom
overview
issues
pulls
pipelines
refactor: reorg routes
serenity
4 weeks ago
f6558e01
dafc272a
+78
-40
5 changed files
expand all
collapse all
unified
split
src
routeTree.gen.ts
routes
_authed
oauth
callback.tsx
_authed.tsx
index.tsx
login.tsx
+61
-37
src/routeTree.gen.ts
···
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 { Route as rootRouteImport } from './routes/__root'
0
0
12
import { Route as IndexRouteImport } from './routes/index'
13
-
import { Route as ReservedLoginRouteImport } from './routes/reserved/login'
14
-
import { Route as ReservedOauthCallbackRouteImport } from './routes/reserved/oauth/callback'
15
0
0
0
0
0
0
0
0
0
16
const IndexRoute = IndexRouteImport.update({
17
id: '/',
18
path: '/',
19
getParentRoute: () => rootRouteImport,
20
} as any)
21
-
const ReservedLoginRoute = ReservedLoginRouteImport.update({
22
-
id: '/reserved/login',
23
-
path: '/reserved/login',
24
-
getParentRoute: () => rootRouteImport,
25
-
} as any)
26
-
const ReservedOauthCallbackRoute = ReservedOauthCallbackRouteImport.update({
27
-
id: '/reserved/oauth/callback',
28
-
path: '/reserved/oauth/callback',
29
-
getParentRoute: () => rootRouteImport,
30
} as any)
31
32
export interface FileRoutesByFullPath {
33
'/': typeof IndexRoute
34
-
'/reserved/login': typeof ReservedLoginRoute
35
-
'/reserved/oauth/callback': typeof ReservedOauthCallbackRoute
36
}
37
export interface FileRoutesByTo {
38
'/': typeof IndexRoute
39
-
'/reserved/login': typeof ReservedLoginRoute
40
-
'/reserved/oauth/callback': typeof ReservedOauthCallbackRoute
41
}
42
export interface FileRoutesById {
43
__root__: typeof rootRouteImport
44
'/': typeof IndexRoute
45
-
'/reserved/login': typeof ReservedLoginRoute
46
-
'/reserved/oauth/callback': typeof ReservedOauthCallbackRoute
0
47
}
48
export interface FileRouteTypes {
49
fileRoutesByFullPath: FileRoutesByFullPath
50
-
fullPaths: '/' | '/reserved/login' | '/reserved/oauth/callback'
51
fileRoutesByTo: FileRoutesByTo
52
-
to: '/' | '/reserved/login' | '/reserved/oauth/callback'
53
-
id: '__root__' | '/' | '/reserved/login' | '/reserved/oauth/callback'
54
fileRoutesById: FileRoutesById
55
}
56
export interface RootRouteChildren {
57
IndexRoute: typeof IndexRoute
58
-
ReservedLoginRoute: typeof ReservedLoginRoute
59
-
ReservedOauthCallbackRoute: typeof ReservedOauthCallbackRoute
60
}
61
62
declare module '@tanstack/react-router' {
63
interface FileRoutesByPath {
0
0
0
0
0
0
0
0
0
0
0
0
0
0
64
'/': {
65
id: '/'
66
path: '/'
···
68
preLoaderRoute: typeof IndexRouteImport
69
parentRoute: typeof rootRouteImport
70
}
71
-
'/reserved/login': {
72
-
id: '/reserved/login'
73
-
path: '/reserved/login'
74
-
fullPath: '/reserved/login'
75
-
preLoaderRoute: typeof ReservedLoginRouteImport
76
-
parentRoute: typeof rootRouteImport
77
-
}
78
-
'/reserved/oauth/callback': {
79
-
id: '/reserved/oauth/callback'
80
-
path: '/reserved/oauth/callback'
81
-
fullPath: '/reserved/oauth/callback'
82
-
preLoaderRoute: typeof ReservedOauthCallbackRouteImport
83
-
parentRoute: typeof rootRouteImport
84
}
85
}
86
}
87
0
0
0
0
0
0
0
0
0
0
0
88
const rootRouteChildren: RootRouteChildren = {
89
IndexRoute: IndexRoute,
90
-
ReservedLoginRoute: ReservedLoginRoute,
91
-
ReservedOauthCallbackRoute: ReservedOauthCallbackRoute,
92
}
93
export const routeTree = rootRouteImport
94
._addFileChildren(rootRouteChildren)
···
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 { Route as rootRouteImport } from './routes/__root'
12
+
import { Route as LoginRouteImport } from './routes/login'
13
+
import { Route as AuthedRouteImport } from './routes/_authed'
14
import { Route as IndexRouteImport } from './routes/index'
15
+
import { Route as AuthedOauthCallbackRouteImport } from './routes/_authed/oauth/callback'
0
16
17
+
const LoginRoute = LoginRouteImport.update({
18
+
id: '/login',
19
+
path: '/login',
20
+
getParentRoute: () => rootRouteImport,
21
+
} as any)
22
+
const AuthedRoute = AuthedRouteImport.update({
23
+
id: '/_authed',
24
+
getParentRoute: () => rootRouteImport,
25
+
} as any)
26
const IndexRoute = IndexRouteImport.update({
27
id: '/',
28
path: '/',
29
getParentRoute: () => rootRouteImport,
30
} as any)
31
+
const AuthedOauthCallbackRoute = AuthedOauthCallbackRouteImport.update({
32
+
id: '/oauth/callback',
33
+
path: '/oauth/callback',
34
+
getParentRoute: () => AuthedRoute,
0
0
0
0
0
35
} as any)
36
37
export interface FileRoutesByFullPath {
38
'/': typeof IndexRoute
39
+
'/login': typeof LoginRoute
40
+
'/oauth/callback': typeof AuthedOauthCallbackRoute
41
}
42
export interface FileRoutesByTo {
43
'/': typeof IndexRoute
44
+
'/login': typeof LoginRoute
45
+
'/oauth/callback': typeof AuthedOauthCallbackRoute
46
}
47
export interface FileRoutesById {
48
__root__: typeof rootRouteImport
49
'/': typeof IndexRoute
50
+
'/_authed': typeof AuthedRouteWithChildren
51
+
'/login': typeof LoginRoute
52
+
'/_authed/oauth/callback': typeof AuthedOauthCallbackRoute
53
}
54
export interface FileRouteTypes {
55
fileRoutesByFullPath: FileRoutesByFullPath
56
+
fullPaths: '/' | '/login' | '/oauth/callback'
57
fileRoutesByTo: FileRoutesByTo
58
+
to: '/' | '/login' | '/oauth/callback'
59
+
id: '__root__' | '/' | '/_authed' | '/login' | '/_authed/oauth/callback'
60
fileRoutesById: FileRoutesById
61
}
62
export interface RootRouteChildren {
63
IndexRoute: typeof IndexRoute
64
+
AuthedRoute: typeof AuthedRouteWithChildren
65
+
LoginRoute: typeof LoginRoute
66
}
67
68
declare module '@tanstack/react-router' {
69
interface FileRoutesByPath {
70
+
'/login': {
71
+
id: '/login'
72
+
path: '/login'
73
+
fullPath: '/login'
74
+
preLoaderRoute: typeof LoginRouteImport
75
+
parentRoute: typeof rootRouteImport
76
+
}
77
+
'/_authed': {
78
+
id: '/_authed'
79
+
path: ''
80
+
fullPath: ''
81
+
preLoaderRoute: typeof AuthedRouteImport
82
+
parentRoute: typeof rootRouteImport
83
+
}
84
'/': {
85
id: '/'
86
path: '/'
···
88
preLoaderRoute: typeof IndexRouteImport
89
parentRoute: typeof rootRouteImport
90
}
91
+
'/_authed/oauth/callback': {
92
+
id: '/_authed/oauth/callback'
93
+
path: '/oauth/callback'
94
+
fullPath: '/oauth/callback'
95
+
preLoaderRoute: typeof AuthedOauthCallbackRouteImport
96
+
parentRoute: typeof AuthedRoute
0
0
0
0
0
0
0
97
}
98
}
99
}
100
101
+
interface AuthedRouteChildren {
102
+
AuthedOauthCallbackRoute: typeof AuthedOauthCallbackRoute
103
+
}
104
+
105
+
const AuthedRouteChildren: AuthedRouteChildren = {
106
+
AuthedOauthCallbackRoute: AuthedOauthCallbackRoute,
107
+
}
108
+
109
+
const AuthedRouteWithChildren =
110
+
AuthedRoute._addFileChildren(AuthedRouteChildren)
111
+
112
const rootRouteChildren: RootRouteChildren = {
113
IndexRoute: IndexRoute,
114
+
AuthedRoute: AuthedRouteWithChildren,
115
+
LoginRoute: LoginRoute,
116
}
117
export const routeTree = rootRouteImport
118
._addFileChildren(rootRouteChildren)
+14
src/routes/_authed.tsx
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
import { createFileRoute, Outlet } from '@tanstack/react-router'
2
+
3
+
export const Route = createFileRoute('/_authed')({
4
+
component: RouteComponent,
5
+
})
6
+
7
+
function RouteComponent() {
8
+
return (
9
+
<div>
10
+
<p>Hello "/_authed"!</p>
11
+
<Outlet />
12
+
</div>
13
+
)
14
+
}
+1
-1
src/routes/index.tsx
···
9
The better frontend for the better forge.
10
</h1>
11
<Link
12
-
to="/reserved/login"
13
className="transition-all hover:bg-overlay0 bg-surface0 text-text p-2 rounded-xs"
14
>
15
Sign in
···
9
The better frontend for the better forge.
10
</h1>
11
<Link
12
+
to="/login"
13
className="transition-all hover:bg-overlay0 bg-surface0 text-text p-2 rounded-xs"
14
>
15
Sign in
+1
-1
src/routes/reserved/login.tsx
src/routes/login.tsx
···
1
import { SignIn } from '@/components/Auth/SignIn'
2
import { createFileRoute } from '@tanstack/react-router'
3
4
-
export const Route = createFileRoute('/reserved/login')({
5
component: RouteComponent,
6
})
7
···
1
import { SignIn } from '@/components/Auth/SignIn'
2
import { createFileRoute } from '@tanstack/react-router'
3
4
+
export const Route = createFileRoute('/login')({
5
component: RouteComponent,
6
})
7
+1
-1
src/routes/reserved/oauth/callback.tsx
src/routes/_authed/oauth/callback.tsx
···
1
import { createFileRoute } from '@tanstack/react-router'
2
3
-
export const Route = createFileRoute('/reserved/oauth/callback')({
4
component: RouteComponent,
5
})
6
···
1
import { createFileRoute } from '@tanstack/react-router'
2
3
+
export const Route = createFileRoute('/_authed/oauth/callback')({
4
component: RouteComponent,
5
})
6