forked from Guepard-Corp/qwery-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.ts
More file actions
57 lines (49 loc) · 1.86 KB
/
routes.ts
File metadata and controls
57 lines (49 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import {
type RouteConfig,
index,
layout,
route,
} from '@react-router/dev/routes';
const rootRoutes = [
route('version', 'routes/version.ts'),
route('healthcheck', 'routes/healthcheck.ts'),
route('qwery/*', 'routes/ingest.$.ts'),
];
const appRoutes = layout('routes/layout/layout.tsx', [
index('routes/index.tsx'),
]);
const organisationsLayout = layout('routes/organizations/layout.tsx', [
route('organizations', 'routes/organizations/index.tsx'),
]);
const orgRoutes = layout('routes/organization/layout.tsx', [
route('org/:slug', 'routes/organization/index.tsx'),
]);
const projectLayout = layout('routes/project/layout.tsx', [
route('prj/:slug', 'routes/project/index.tsx'),
route('notebook/:slug', 'routes/project/notebook.tsx'),
route('prj/:slug/notebooks', 'routes/project/notebooks/index.tsx'),
route('prj/:slug/ds', 'routes/project/datasources/index.tsx'),
route('prj/:slug/ds/new', 'routes/project/datasources/sources.tsx'),
route('prj/:slug/ds/:id/new', 'routes/project/datasources/new.tsx'),
route('prj/:slug/playground', 'routes/project/playground.tsx'),
route('prj/:slug/c', 'routes/project/conversation/index.tsx'),
route('c/:slug', 'routes/project/conversation/conversation.tsx'),
]);
const datasourceLayout = layout('routes/datasource/layout.tsx', [
route('ds/:slug', 'routes/datasource/index.tsx'),
route('ds/:slug/tables', 'routes/datasource/tables.tsx'),
route('ds/:slug/tables/:schema/:tableName', 'routes/datasource/table.tsx'),
route('ds/:slug/schema', 'routes/datasource/schema.tsx'),
route('ds/:slug/settings', 'routes/datasource/settings.tsx'),
]);
// Catch-all route for unmatched paths (must be last)
const catchAllRoute = route('*', 'routes/404.tsx');
export default [
...rootRoutes,
appRoutes,
organisationsLayout,
orgRoutes,
projectLayout,
datasourceLayout,
catchAllRoute,
] satisfies RouteConfig;