UAIDE / src /App.jsx
ATS-27's picture
Upload folder using huggingface_hub
af980d7 verified
Raw
History Blame Contribute Delete
2.71 kB
import { AnimatePresence, motion } from 'framer-motion';
import Navbar from './components/Navbar';
import LandingPage from './components/LandingPage';
import AnalysisProgress from './components/AnalysisProgress';
import ForensicDashboard from './components/ForensicDashboard';
import { useAnalysis } from './hooks/useAnalysis';
import { useTheme } from './hooks/useTheme';
import styles from './App.module.css';
export default function App() {
const { phase, currentStage, progress, result, file, previewUrl, error, analyze, reset } = useAnalysis();
const { theme, toggleTheme } = useTheme();
return (
<div className={styles.app}>
<Navbar theme={theme} onToggleTheme={toggleTheme} />
<main className={styles.main}>
<AnimatePresence mode="wait">
{phase === 'idle' && (
<motion.div
key="landing"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.25 }}
>
<LandingPage onFileSelect={analyze} error={error} />
</motion.div>
)}
{(phase === 'uploading' || phase === 'analyzing') && (
<motion.div
key="progress"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.25 }}
>
<AnalysisProgress
phase={phase}
currentStage={currentStage}
progress={progress}
file={file}
/>
</motion.div>
)}
{phase === 'complete' && result && (
<motion.div
key="dashboard"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.3 }}
className={styles.dashboardWrap}
>
<ForensicDashboard
result={result}
previewUrl={previewUrl}
onReset={reset}
/>
</motion.div>
)}
</AnimatePresence>
</main>
<footer className={styles.footer}>
<p>
<span className={styles.footerBrand}>UAIDE</span>
{' '}路 Unified AI Origin Detection Engine 路 Academic Defense Interface 路{' '}
<span>For evaluators, researchers, and investigators</span>
</p>
<p className={styles.footerDisclaimer}>
Detection outcomes are probabilistic and intended to support, not replace, expert human review.
</p>
</footer>
</div>
);
}