tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
[web] fix route issue
tsiry-sandratraina.com
8 months ago
840e449f
814c2de1
+75
-95
10 changed files
expand all
collapse all
unified
split
apps
web
src
pages
dropbox
Dropbox.tsx
DropboxWithId.tsx
googledrive
GoogleDriveWithId.tsx
routeTree.gen.ts
routes
dropbox
$id.tsx
index.tsx
dropbox.tsx
googledrive
$id.tsx
index.tsx
googledrive.tsx
+1
-1
apps/web/src/pages/dropbox/Dropbox.tsx
···
154
154
{parent_dir && current_dir !== "Music" && (
155
155
<Link
156
156
to={current_dir === "Music" ? `/dropbox` : `/dropbox/$id`}
157
157
-
params={{ id: parent_id }}
157
157
+
params={{ id: parent_id! }}
158
158
className="!text-[var(--color-text)]"
159
159
>
160
160
{parent_dir}
+1
-2
apps/web/src/pages/dropbox/DropboxWithId.tsx
···
2
2
import Dropbox from "./Dropbox";
3
3
4
4
function DropboxWithId() {
5
5
-
const { id } = useParams({ strict: false });
6
6
-
console.log(">> id", id);
5
5
+
const { id } = useParams({ from: "/dropbox/$id" });
7
6
return <Dropbox fileId={id} />;
8
7
}
9
8
+1
-1
apps/web/src/pages/googledrive/GoogleDriveWithId.tsx
···
2
2
import GoogleDrive from "./GoogleDrive";
3
3
4
4
function GoogleDriveWithId() {
5
5
-
const { id } = useParams({ strict: false });
5
5
+
const { id } = useParams({ from: "/googledrive/$id" });
6
6
return <GoogleDrive fileId={id} />;
7
7
}
8
8
+58
-77
apps/web/src/routeTree.gen.ts
···
11
11
import { Route as rootRouteImport } from './routes/__root'
12
12
import { Route as ScrobbleRouteImport } from './routes/scrobble'
13
13
import { Route as LoadingRouteImport } from './routes/loading'
14
14
-
import { Route as GoogledriveRouteImport } from './routes/googledrive'
15
15
-
import { Route as DropboxRouteImport } from './routes/dropbox'
16
14
import { Route as ApikeysRouteImport } from './routes/apikeys'
17
15
import { Route as IndexRouteImport } from './routes/index'
16
16
+
import { Route as GoogledriveIndexRouteImport } from './routes/googledrive/index'
17
17
+
import { Route as DropboxIndexRouteImport } from './routes/dropbox/index'
18
18
import { Route as ProfileDidRouteImport } from './routes/profile.$did'
19
19
-
import { Route as GoogledriveIdRouteImport } from './routes/googledrive.$id'
20
20
-
import { Route as DropboxIdRouteImport } from './routes/dropbox.$id'
19
19
+
import { Route as GoogledriveIdRouteImport } from './routes/googledrive/$id'
20
20
+
import { Route as DropboxIdRouteImport } from './routes/dropbox/$id'
21
21
import { Route as DidSongRkeyRouteImport } from './routes/$did.song.$rkey'
22
22
import { Route as DidScrobbleRkeyRouteImport } from './routes/$did.scrobble.$rkey'
23
23
import { Route as DidPlaylistRkeyRouteImport } from './routes/$did.playlist.$rkey'
···
34
34
path: '/loading',
35
35
getParentRoute: () => rootRouteImport,
36
36
} as any)
37
37
-
const GoogledriveRoute = GoogledriveRouteImport.update({
38
38
-
id: '/googledrive',
39
39
-
path: '/googledrive',
40
40
-
getParentRoute: () => rootRouteImport,
41
41
-
} as any)
42
42
-
const DropboxRoute = DropboxRouteImport.update({
43
43
-
id: '/dropbox',
44
44
-
path: '/dropbox',
45
45
-
getParentRoute: () => rootRouteImport,
46
46
-
} as any)
47
37
const ApikeysRoute = ApikeysRouteImport.update({
48
38
id: '/apikeys',
49
39
path: '/apikeys',
···
54
44
path: '/',
55
45
getParentRoute: () => rootRouteImport,
56
46
} as any)
47
47
+
const GoogledriveIndexRoute = GoogledriveIndexRouteImport.update({
48
48
+
id: '/googledrive/',
49
49
+
path: '/googledrive/',
50
50
+
getParentRoute: () => rootRouteImport,
51
51
+
} as any)
52
52
+
const DropboxIndexRoute = DropboxIndexRouteImport.update({
53
53
+
id: '/dropbox/',
54
54
+
path: '/dropbox/',
55
55
+
getParentRoute: () => rootRouteImport,
56
56
+
} as any)
57
57
const ProfileDidRoute = ProfileDidRouteImport.update({
58
58
id: '/profile/$did',
59
59
path: '/profile/$did',
60
60
getParentRoute: () => rootRouteImport,
61
61
} as any)
62
62
const GoogledriveIdRoute = GoogledriveIdRouteImport.update({
63
63
-
id: '/$id',
64
64
-
path: '/$id',
65
65
-
getParentRoute: () => GoogledriveRoute,
63
63
+
id: '/googledrive/$id',
64
64
+
path: '/googledrive/$id',
65
65
+
getParentRoute: () => rootRouteImport,
66
66
} as any)
67
67
const DropboxIdRoute = DropboxIdRouteImport.update({
68
68
-
id: '/$id',
69
69
-
path: '/$id',
70
70
-
getParentRoute: () => DropboxRoute,
68
68
+
id: '/dropbox/$id',
69
69
+
path: '/dropbox/$id',
70
70
+
getParentRoute: () => rootRouteImport,
71
71
} as any)
72
72
const DidSongRkeyRoute = DidSongRkeyRouteImport.update({
73
73
id: '/$did/song/$rkey',
···
98
98
export interface FileRoutesByFullPath {
99
99
'/': typeof IndexRoute
100
100
'/apikeys': typeof ApikeysRoute
101
101
-
'/dropbox': typeof DropboxRouteWithChildren
102
102
-
'/googledrive': typeof GoogledriveRouteWithChildren
103
101
'/loading': typeof LoadingRoute
104
102
'/scrobble': typeof ScrobbleRoute
105
103
'/dropbox/$id': typeof DropboxIdRoute
106
104
'/googledrive/$id': typeof GoogledriveIdRoute
107
105
'/profile/$did': typeof ProfileDidRoute
106
106
+
'/dropbox': typeof DropboxIndexRoute
107
107
+
'/googledrive': typeof GoogledriveIndexRoute
108
108
'/$did/album/$rkey': typeof DidAlbumRkeyRoute
109
109
'/$did/artist/$rkey': typeof DidArtistRkeyRoute
110
110
'/$did/playlist/$rkey': typeof DidPlaylistRkeyRoute
···
114
114
export interface FileRoutesByTo {
115
115
'/': typeof IndexRoute
116
116
'/apikeys': typeof ApikeysRoute
117
117
-
'/dropbox': typeof DropboxRouteWithChildren
118
118
-
'/googledrive': typeof GoogledriveRouteWithChildren
119
117
'/loading': typeof LoadingRoute
120
118
'/scrobble': typeof ScrobbleRoute
121
119
'/dropbox/$id': typeof DropboxIdRoute
122
120
'/googledrive/$id': typeof GoogledriveIdRoute
123
121
'/profile/$did': typeof ProfileDidRoute
122
122
+
'/dropbox': typeof DropboxIndexRoute
123
123
+
'/googledrive': typeof GoogledriveIndexRoute
124
124
'/$did/album/$rkey': typeof DidAlbumRkeyRoute
125
125
'/$did/artist/$rkey': typeof DidArtistRkeyRoute
126
126
'/$did/playlist/$rkey': typeof DidPlaylistRkeyRoute
···
131
131
__root__: typeof rootRouteImport
132
132
'/': typeof IndexRoute
133
133
'/apikeys': typeof ApikeysRoute
134
134
-
'/dropbox': typeof DropboxRouteWithChildren
135
135
-
'/googledrive': typeof GoogledriveRouteWithChildren
136
134
'/loading': typeof LoadingRoute
137
135
'/scrobble': typeof ScrobbleRoute
138
136
'/dropbox/$id': typeof DropboxIdRoute
139
137
'/googledrive/$id': typeof GoogledriveIdRoute
140
138
'/profile/$did': typeof ProfileDidRoute
139
139
+
'/dropbox/': typeof DropboxIndexRoute
140
140
+
'/googledrive/': typeof GoogledriveIndexRoute
141
141
'/$did/album/$rkey': typeof DidAlbumRkeyRoute
142
142
'/$did/artist/$rkey': typeof DidArtistRkeyRoute
143
143
'/$did/playlist/$rkey': typeof DidPlaylistRkeyRoute
···
149
149
fullPaths:
150
150
| '/'
151
151
| '/apikeys'
152
152
-
| '/dropbox'
153
153
-
| '/googledrive'
154
152
| '/loading'
155
153
| '/scrobble'
156
154
| '/dropbox/$id'
157
155
| '/googledrive/$id'
158
156
| '/profile/$did'
157
157
+
| '/dropbox'
158
158
+
| '/googledrive'
159
159
| '/$did/album/$rkey'
160
160
| '/$did/artist/$rkey'
161
161
| '/$did/playlist/$rkey'
···
165
165
to:
166
166
| '/'
167
167
| '/apikeys'
168
168
-
| '/dropbox'
169
169
-
| '/googledrive'
170
168
| '/loading'
171
169
| '/scrobble'
172
170
| '/dropbox/$id'
173
171
| '/googledrive/$id'
174
172
| '/profile/$did'
173
173
+
| '/dropbox'
174
174
+
| '/googledrive'
175
175
| '/$did/album/$rkey'
176
176
| '/$did/artist/$rkey'
177
177
| '/$did/playlist/$rkey'
···
181
181
| '__root__'
182
182
| '/'
183
183
| '/apikeys'
184
184
-
| '/dropbox'
185
185
-
| '/googledrive'
186
184
| '/loading'
187
185
| '/scrobble'
188
186
| '/dropbox/$id'
189
187
| '/googledrive/$id'
190
188
| '/profile/$did'
189
189
+
| '/dropbox/'
190
190
+
| '/googledrive/'
191
191
| '/$did/album/$rkey'
192
192
| '/$did/artist/$rkey'
193
193
| '/$did/playlist/$rkey'
···
198
198
export interface RootRouteChildren {
199
199
IndexRoute: typeof IndexRoute
200
200
ApikeysRoute: typeof ApikeysRoute
201
201
-
DropboxRoute: typeof DropboxRouteWithChildren
202
202
-
GoogledriveRoute: typeof GoogledriveRouteWithChildren
203
201
LoadingRoute: typeof LoadingRoute
204
202
ScrobbleRoute: typeof ScrobbleRoute
203
203
+
DropboxIdRoute: typeof DropboxIdRoute
204
204
+
GoogledriveIdRoute: typeof GoogledriveIdRoute
205
205
ProfileDidRoute: typeof ProfileDidRoute
206
206
+
DropboxIndexRoute: typeof DropboxIndexRoute
207
207
+
GoogledriveIndexRoute: typeof GoogledriveIndexRoute
206
208
DidAlbumRkeyRoute: typeof DidAlbumRkeyRoute
207
209
DidArtistRkeyRoute: typeof DidArtistRkeyRoute
208
210
DidPlaylistRkeyRoute: typeof DidPlaylistRkeyRoute
···
226
228
preLoaderRoute: typeof LoadingRouteImport
227
229
parentRoute: typeof rootRouteImport
228
230
}
229
229
-
'/googledrive': {
230
230
-
id: '/googledrive'
231
231
-
path: '/googledrive'
232
232
-
fullPath: '/googledrive'
233
233
-
preLoaderRoute: typeof GoogledriveRouteImport
234
234
-
parentRoute: typeof rootRouteImport
235
235
-
}
236
236
-
'/dropbox': {
237
237
-
id: '/dropbox'
238
238
-
path: '/dropbox'
239
239
-
fullPath: '/dropbox'
240
240
-
preLoaderRoute: typeof DropboxRouteImport
241
241
-
parentRoute: typeof rootRouteImport
242
242
-
}
243
231
'/apikeys': {
244
232
id: '/apikeys'
245
233
path: '/apikeys'
···
254
242
preLoaderRoute: typeof IndexRouteImport
255
243
parentRoute: typeof rootRouteImport
256
244
}
245
245
+
'/googledrive/': {
246
246
+
id: '/googledrive/'
247
247
+
path: '/googledrive'
248
248
+
fullPath: '/googledrive'
249
249
+
preLoaderRoute: typeof GoogledriveIndexRouteImport
250
250
+
parentRoute: typeof rootRouteImport
251
251
+
}
252
252
+
'/dropbox/': {
253
253
+
id: '/dropbox/'
254
254
+
path: '/dropbox'
255
255
+
fullPath: '/dropbox'
256
256
+
preLoaderRoute: typeof DropboxIndexRouteImport
257
257
+
parentRoute: typeof rootRouteImport
258
258
+
}
257
259
'/profile/$did': {
258
260
id: '/profile/$did'
259
261
path: '/profile/$did'
···
263
265
}
264
266
'/googledrive/$id': {
265
267
id: '/googledrive/$id'
266
266
-
path: '/$id'
268
268
+
path: '/googledrive/$id'
267
269
fullPath: '/googledrive/$id'
268
270
preLoaderRoute: typeof GoogledriveIdRouteImport
269
269
-
parentRoute: typeof GoogledriveRoute
271
271
+
parentRoute: typeof rootRouteImport
270
272
}
271
273
'/dropbox/$id': {
272
274
id: '/dropbox/$id'
273
273
-
path: '/$id'
275
275
+
path: '/dropbox/$id'
274
276
fullPath: '/dropbox/$id'
275
277
preLoaderRoute: typeof DropboxIdRouteImport
276
276
-
parentRoute: typeof DropboxRoute
278
278
+
parentRoute: typeof rootRouteImport
277
279
}
278
280
'/$did/song/$rkey': {
279
281
id: '/$did/song/$rkey'
···
313
315
}
314
316
}
315
317
316
316
-
interface DropboxRouteChildren {
317
317
-
DropboxIdRoute: typeof DropboxIdRoute
318
318
-
}
319
319
-
320
320
-
const DropboxRouteChildren: DropboxRouteChildren = {
321
321
-
DropboxIdRoute: DropboxIdRoute,
322
322
-
}
323
323
-
324
324
-
const DropboxRouteWithChildren =
325
325
-
DropboxRoute._addFileChildren(DropboxRouteChildren)
326
326
-
327
327
-
interface GoogledriveRouteChildren {
328
328
-
GoogledriveIdRoute: typeof GoogledriveIdRoute
329
329
-
}
330
330
-
331
331
-
const GoogledriveRouteChildren: GoogledriveRouteChildren = {
332
332
-
GoogledriveIdRoute: GoogledriveIdRoute,
333
333
-
}
334
334
-
335
335
-
const GoogledriveRouteWithChildren = GoogledriveRoute._addFileChildren(
336
336
-
GoogledriveRouteChildren,
337
337
-
)
338
338
-
339
318
const rootRouteChildren: RootRouteChildren = {
340
319
IndexRoute: IndexRoute,
341
320
ApikeysRoute: ApikeysRoute,
342
342
-
DropboxRoute: DropboxRouteWithChildren,
343
343
-
GoogledriveRoute: GoogledriveRouteWithChildren,
344
321
LoadingRoute: LoadingRoute,
345
322
ScrobbleRoute: ScrobbleRoute,
323
323
+
DropboxIdRoute: DropboxIdRoute,
324
324
+
GoogledriveIdRoute: GoogledriveIdRoute,
346
325
ProfileDidRoute: ProfileDidRoute,
326
326
+
DropboxIndexRoute: DropboxIndexRoute,
327
327
+
GoogledriveIndexRoute: GoogledriveIndexRoute,
347
328
DidAlbumRkeyRoute: DidAlbumRkeyRoute,
348
329
DidArtistRkeyRoute: DidArtistRkeyRoute,
349
330
DidPlaylistRkeyRoute: DidPlaylistRkeyRoute,
+1
-1
apps/web/src/routes/dropbox.$id.tsx
apps/web/src/routes/dropbox/$id.tsx
···
1
1
import { createFileRoute } from "@tanstack/react-router";
2
2
-
import DropboxWithIdPage from "../pages/dropbox/DropboxWithId";
2
2
+
import DropboxWithIdPage from "../../pages/dropbox/DropboxWithId";
3
3
4
4
export const Route = createFileRoute("/dropbox/$id")({
5
5
component: DropboxWithIdPage,
-6
apps/web/src/routes/dropbox.tsx
···
1
1
-
import { createFileRoute } from "@tanstack/react-router";
2
2
-
import DropboxPage from "../pages/dropbox";
3
3
-
4
4
-
export const Route = createFileRoute("/dropbox")({
5
5
-
component: DropboxPage,
6
6
-
});
+6
apps/web/src/routes/dropbox/index.tsx
···
1
1
+
import { createFileRoute } from "@tanstack/react-router";
2
2
+
import Dropbox from "../../pages/dropbox";
3
3
+
4
4
+
export const Route = createFileRoute("/dropbox/")({
5
5
+
component: Dropbox,
6
6
+
});
+1
-1
apps/web/src/routes/googledrive.$id.tsx
apps/web/src/routes/googledrive/$id.tsx
···
1
1
import { createFileRoute } from "@tanstack/react-router";
2
2
-
import GoogleDriveWithIdPage from "../pages/googledrive/GoogleDriveWithId";
2
2
+
import GoogleDriveWithIdPage from "../../pages/googledrive/GoogleDriveWithId";
3
3
4
4
export const Route = createFileRoute("/googledrive/$id")({
5
5
component: GoogleDriveWithIdPage,
-6
apps/web/src/routes/googledrive.tsx
···
1
1
-
import { createFileRoute } from "@tanstack/react-router";
2
2
-
import GoogleDrivePage from "../pages/googledrive";
3
3
-
4
4
-
export const Route = createFileRoute("/googledrive")({
5
5
-
component: GoogleDrivePage,
6
6
-
});
+6
apps/web/src/routes/googledrive/index.tsx
···
1
1
+
import { createFileRoute } from "@tanstack/react-router";
2
2
+
import GoogleDrive from "../../pages/googledrive";
3
3
+
4
4
+
export const Route = createFileRoute("/googledrive/")({
5
5
+
component: GoogleDrive,
6
6
+
});