forked from lightningpixel/modly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.tsx
More file actions
19 lines (16 loc) · 875 Bytes
/
Copy pathroutes.tsx
File metadata and controls
19 lines (16 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { lazy } from 'react'
import type { Page } from '@shared/stores/navStore'
const GeneratePage = lazy(() => import('@areas/generate/GeneratePage'))
const WorkflowsPage = lazy(() => import('@areas/workflows/WorkflowsPage'))
const ModelsPage = lazy(() => import('@areas/models/ModelsPage'))
const SettingsPage = lazy(() => import('@areas/settings/SettingsPage'))
export interface RouteConfig {
component: React.ComponentType
wrapperClass: string
}
export const ROUTES: Record<Page, RouteConfig> = {
generate: { component: GeneratePage, wrapperClass: 'flex flex-1 overflow-hidden' },
workflows: { component: WorkflowsPage, wrapperClass: 'flex flex-1 overflow-hidden' },
models: { component: ModelsPage, wrapperClass: 'flex-1 overflow-y-auto' },
settings: { component: SettingsPage, wrapperClass: 'flex-1 overflow-hidden' },
}