import { useNavigate } from 'react-router-dom'; import { ArrowLeft, Glasses, Box, Ruler, FileText } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { useModelStore } from '@/stores/useModelStore'; import { ModelViewerCanvas } from '@/components/three/ModelViewer'; import { ViewerControls } from '@/components/ViewerControls'; import { InspectionChecklist } from '@/components/InspectionChecklist'; import { useEffect } from 'react'; import { toast } from 'sonner'; import { ScrollArea } from '@/components/ui/scroll-area'; import { Separator } from '@/components/ui/separator'; const Viewer = () => { const navigate = useNavigate(); const { model, xrSupported } = useModelStore(); useEffect(() => { if (!model) { navigate('/'); } }, [model, navigate]); if (!model) return null; const handleEnterXR = async () => { if (!xrSupported) { toast.error('WebXR não é suportado neste navegador. Use o navegador do Meta Quest 3.'); return; } navigate('/xr'); }; return (
{/* Top bar */}

TrackkSteelXR

{/* 3D Canvas with floating controls */}
{/* Side panel */}
); }; function InfoItem({ icon: Icon, label, value }: { icon: any; label: string; value: string }) { return (

{label}

{value}

); } export default Viewer;