diff --git a/frontend/src/app/router.tsx b/frontend/src/app/router.tsx index eb33387..ccfc86a 100644 --- a/frontend/src/app/router.tsx +++ b/frontend/src/app/router.tsx @@ -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 } - return ( -
-
-

Route

-

{route}

-
-
- ) + if (route === '/tickets/new') { + return + } + + const ticketMatch = route.match(/^\/tickets\/(\d+)$/) + if (ticketMatch) { + return + } + + return } diff --git a/frontend/src/components/app/AppEmptyState.tsx b/frontend/src/components/app/AppEmptyState.tsx new file mode 100644 index 0000000..c7933ce --- /dev/null +++ b/frontend/src/components/app/AppEmptyState.tsx @@ -0,0 +1,13 @@ +type AppEmptyStateProps = { + title: string + description?: string +} + +export function AppEmptyState({ title, description }: AppEmptyStateProps) { + return ( +
+

{title}

+ {description ?

{description}

: null} +
+ ) +} diff --git a/frontend/src/components/app/AppField.tsx b/frontend/src/components/app/AppField.tsx new file mode 100644 index 0000000..2a160cc --- /dev/null +++ b/frontend/src/components/app/AppField.tsx @@ -0,0 +1,15 @@ +import type * as React from 'react' + +type AppFieldProps = { + label: string + children: React.ReactNode +} + +export function AppField({ label, children }: AppFieldProps) { + return ( + + ) +} diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsx new file mode 100644 index 0000000..e326526 --- /dev/null +++ b/frontend/src/components/ui/input.tsx @@ -0,0 +1,15 @@ +import * as React from 'react' + +import { cn } from '@/lib/cn' + +export function Input({ className, ...props }: React.InputHTMLAttributes) { + return ( + + ) +} diff --git a/frontend/src/components/ui/select.tsx b/frontend/src/components/ui/select.tsx new file mode 100644 index 0000000..02230ab --- /dev/null +++ b/frontend/src/components/ui/select.tsx @@ -0,0 +1,15 @@ +import * as React from 'react' + +import { cn } from '@/lib/cn' + +export function Select({ className, ...props }: React.SelectHTMLAttributes) { + return ( +