36 lines
952 B
TypeScript
36 lines
952 B
TypeScript
'use client';
|
|
|
|
import { ArrowLeft } from 'lucide-react';
|
|
import { useRouter } from 'next/navigation';
|
|
|
|
import { Button } from '@/components/ui/button';
|
|
import type { TicketOverviewDetail } from '@/types';
|
|
|
|
export function TicketDetailHeader({
|
|
ticket,
|
|
}: {
|
|
ticket: TicketOverviewDetail;
|
|
}) {
|
|
const router = useRouter();
|
|
const ticketLabel = ticket.ticket_name || ticket.id;
|
|
|
|
return (
|
|
<div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
<div className="min-w-0 space-y-1">
|
|
<h1 className="text-2xl font-semibold tracking-tight">Ticket Detail</h1>
|
|
<p className="text-xs ">Ticket: {ticketLabel}</p>
|
|
</div>
|
|
|
|
<div className="flex shrink-0 items-center gap-2">
|
|
<Button
|
|
variant="secondary"
|
|
onClick={() => router.push('/ticket')}
|
|
>
|
|
<ArrowLeft className="size-4" />
|
|
Back to List
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|