refactor: modularize road management modules
This commit is contained in:
@@ -8,7 +8,7 @@ import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ChainageSummaryData } from '@/types';
|
||||
import { projectService } from '@/services/api';
|
||||
import { projectSummaryService } from '@/services/api';
|
||||
import { getDetectionModeConfig } from '@/constants/detectionModeConfig';
|
||||
|
||||
// Dynamically import MapModal with SSR disabled (Leaflet requires window object)
|
||||
@@ -37,7 +37,10 @@ const DetailedSummarySection = ({
|
||||
const fetchSummary = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await projectService.getProjectSummaryByVideo(projectId, videoId);
|
||||
const data = await projectSummaryService.getProjectSummaryByVideo<ChainageSummaryData>(
|
||||
projectId,
|
||||
videoId,
|
||||
);
|
||||
setSummaryData(data);
|
||||
} catch (err) {
|
||||
console.error('Failed to fetch summary:', err);
|
||||
|
||||
Reference in New Issue
Block a user