// Demo page for ReportDetailModal component import { useState } from 'react'; import { ReportDetailModal } from '@/components/report'; import type { ReportResponseDTO } from '@/types'; // Mock report data for demonstration const mockReport: ReportResponseDTO = { id: 'demo-report-1', userId: 'user-123', latitude: 53.3498, longitude: -6.2603, locationSource: 'gps', photoUrls: [ 'https://images.unsplash.com/photo-1621451537084-482c73073a0f?w=800', 'https://images.unsplash.com/photo-1618477461853-cf6ed80faba5?w=800', ], photoTimestamp: new Date('2024-11-15T14:30:00Z'), litterType: 'plastic', quantity: 'significant', description: 'Large amount of plastic bottles and bags scattered along the shoreline. Some items appear to be recent, while others show signs of weathering. The area is popular with tourists and locals.', createdAt: new Date('2024-11-15T15:00:00Z'), updatedAt: new Date('2024-11-15T15:00:00Z'), submittedAt: new Date('2024-11-15T15:00:00Z'), verificationStatus: 'verified', user: { id: 'user-123', username: 'beachguardian', avatarUrl: 'https://api.dicebear.com/7.x/avataaars/svg?seed=beachguardian', }, verificationCount: 5, disputeCount: 0, environmentalConcerns: [ { id: 'concern-1', reportId: 'demo-report-1', concernType: 'Wildlife hazard', severity: 'high', description: 'Plastic bags pose entanglement risk for seabirds and marine life in the area.', createdAt: new Date('2024-11-15T15:00:00Z'), }, ], }; const mockReportPending: ReportResponseDTO = { ...mockReport, id: 'demo-report-2', verificationStatus: 'pending', verificationCount: 0, disputeCount: 0, description: 'Small collection of glass bottles near the beach entrance.', litterType: 'glass', quantity: 'minimal', environmentalConcerns: [], }; const mockReportDisputed: ReportResponseDTO = { ...mockReport, id: 'demo-report-3', verificationStatus: 'disputed', verificationCount: 2, disputeCount: 3, description: 'Hazardous waste containers found near the water.', litterType: 'hazardous', quantity: 'moderate', }; export function ReportDetailDemo() { const [selectedReport, setSelectedReport] = useState(null); const [isModalOpen, setIsModalOpen] = useState(false); const handleOpenModal = (report: ReportResponseDTO) => { setSelectedReport(report); setIsModalOpen(true); }; const handleCloseModal = () => { setIsModalOpen(false); }; const handleVerify = (reportId: string) => { console.log('Verifying report:', reportId); alert(`Report ${reportId} verified!`); setIsModalOpen(false); }; const handleDispute = (reportId: string) => { console.log('Disputing report:', reportId); alert(`Report ${reportId} disputed!`); setIsModalOpen(false); }; return (

Report Detail Modal Demo

Click on any report card to view its details in the modal.

{/* Verified Report Card */} {/* Pending Report Card */} {/* Disputed Report Card */}
{/* Info Section */}

About This Demo

Verified Report: Shows a report with multiple verifications and environmental concerns.

Pending Report: Shows a newly submitted report awaiting community verification.

Disputed Report: Shows a report that has received dispute flags from the community.

Click any card to open the detailed modal view with photo gallery, verification actions, and full report information.

{/* Report Detail Modal */} {selectedReport && ( )}
); }