36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
|
|
import { ProjectAi } from './project-ai'
|
||
|
|
import { ProjectCron } from './project-cron'
|
||
|
|
import { ProjectInbox } from './project-inbox'
|
||
|
|
import { ProjectNotes } from './project-notes'
|
||
|
|
import { ProjectOverview } from './project-overview'
|
||
|
|
import { ProjectTasks } from './project-tasks'
|
||
|
|
import type { ChannelKey, Project } from './project-types'
|
||
|
|
|
||
|
|
export function ProjectChannelPage({
|
||
|
|
activeChannel,
|
||
|
|
activeProject,
|
||
|
|
onSelectItem,
|
||
|
|
}: {
|
||
|
|
activeChannel: ChannelKey
|
||
|
|
activeProject: Project
|
||
|
|
onSelectItem: (title: string) => void
|
||
|
|
}) {
|
||
|
|
switch (activeChannel) {
|
||
|
|
case 'inbox':
|
||
|
|
return <ProjectInbox activeProject={activeProject} onSelectItem={onSelectItem} />
|
||
|
|
case 'tasks':
|
||
|
|
return <ProjectTasks activeProject={activeProject} onSelectItem={onSelectItem} />
|
||
|
|
case 'ai':
|
||
|
|
return <ProjectAi activeProject={activeProject} onSelectItem={onSelectItem} />
|
||
|
|
case 'notes':
|
||
|
|
return <ProjectNotes activeProject={activeProject} onSelectItem={onSelectItem} />
|
||
|
|
case 'cron':
|
||
|
|
return <ProjectCron activeProject={activeProject} onSelectItem={onSelectItem} />
|
||
|
|
case 'overview':
|
||
|
|
case 'research':
|
||
|
|
case 'design':
|
||
|
|
default:
|
||
|
|
return <ProjectOverview onSelectItem={onSelectItem} />
|
||
|
|
}
|
||
|
|
}
|