const { useState, useRef, useEffect, useCallback } = React; const STATUS_MESSAGES = { uploading: 'Uploading video\u2026', detecting: 'Detecting faces & predicting deepfake\u2026', processing_video: 'Generating face detection video\u2026', }; function barClass(s) { return s > 0.8 ? 'bar-green' : s > 0.2 ? 'bar-orange' : 'bar-red'; } function scoreClass(s) { return s > 0.8 ? 'score-green' : s > 0.2 ? 'score-orange' : 'score-red'; } /* ── Simple hash-based router ── */ function useHashRoute() { const [route, setRoute] = useState(window.location.hash || '#/'); useEffect(() => { const onHash = () => setRoute(window.location.hash || '#/'); window.addEventListener('hashchange', onHash); return () => window.removeEventListener('hashchange', onHash); }, []); return route; } /* ── Navbar ── */ function Navbar({ route }) { return (
AI-Deepfake Video Detection
); } /* ── Main App ── */ function App() { const [file, setFile] = useState(null); const [status, setStatus] = useState(null); const [error, setError] = useState(null); const [result, setResult] = useState(null); const [submitting, setSubmitting] = useState(false); const route = useHashRoute(); return ( <> {route === '#/technology' ? ( ) : ( )} ); } ReactDOM.createRoot(document.getElementById('root')).render();