feat: add ticket workflow pages
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import * as React from 'react'
|
||||
|
||||
import { DesignSystemPreview } from '@/features/design-system/DesignSystemPreview'
|
||||
import { TicketCreatePage } from '@/features/tickets/TicketCreatePage'
|
||||
import { TicketDetailPage } from '@/features/tickets/TicketDetailPage'
|
||||
import { TicketListPage } from '@/features/tickets/TicketListPage'
|
||||
|
||||
function getRoute() {
|
||||
return window.location.hash.replace(/^#/, '') || '/tickets'
|
||||
@@ -19,12 +22,14 @@ export function Router() {
|
||||
return <DesignSystemPreview />
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-background p-6 text-foreground">
|
||||
<div className="mx-auto max-w-6xl">
|
||||
<p className="text-sm text-muted-foreground">Route</p>
|
||||
<h1 className="mt-2 text-xl font-semibold">{route}</h1>
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
if (route === '/tickets/new') {
|
||||
return <TicketCreatePage />
|
||||
}
|
||||
|
||||
const ticketMatch = route.match(/^\/tickets\/(\d+)$/)
|
||||
if (ticketMatch) {
|
||||
return <TicketDetailPage ticketId={Number(ticketMatch[1])} />
|
||||
}
|
||||
|
||||
return <TicketListPage />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user