feat: ticket system base implementation

This commit is contained in:
2026-06-19 01:19:01 +05:30
parent a18fff4d6f
commit 8c3d19a429
19 changed files with 1400 additions and 27 deletions

View File

@@ -1,10 +1,11 @@
'use client';
import { useMemo } from 'react';
import { useParams } from 'next/navigation';
import { Loader2, TrendingUp } from 'lucide-react';
import { useParams, useRouter } from 'next/navigation';
import { ArrowLeft, Loader2, TrendingUp } from 'lucide-react';
import VideoPlayerSection from '@/components/videoPlayerSection';
import { PageHeader } from '@/components/page-header';
import { Button } from '@/components/ui/button';
import { CompletedVideoResult, DetectionType } from '@/types';
import { getDetectionModeConfig } from '@/constants/detectionModeConfig';
import { useVideoResultsQuery } from '../hooks/useVideoResults';
@@ -21,6 +22,7 @@ const inferDetectionType = (data: CompletedVideoResult): DetectionType => {
};
export default function VideoResultsPage() {
const router = useRouter();
const { videoId } = useParams() as { videoId: string };
const {
@@ -31,7 +33,8 @@ export default function VideoResultsPage() {
} = useVideoResultsQuery(videoId);
const detectionType = useMemo<DetectionType>(
() => (detectionData ? inferDetectionType(detectionData) : 'pothole-detection'),
() =>
detectionData ? inferDetectionType(detectionData) : 'pothole-detection',
[detectionData],
);
@@ -68,6 +71,12 @@ export default function VideoResultsPage() {
title={getTitle()}
description={`Video ID: ${videoId}`}
icon={TrendingUp}
actions={
<Button variant="outline" size="sm" onClick={() => router.back()}>
<ArrowLeft />
Back
</Button>
}
/>
{detectionData && <VideoPlayerSection data={detectionData} />}