import React, { useEffect, useState } from 'react'; import { Link, Routes, Route, useNavigate } from 'react-router-dom'; import { Enroll, Compare, Liveness, Search, VerifySection } from './Section'; const Verify = () => { const verifyTabs = [ { name: 'Enroll', link: 'face-enroll' }, { name: 'Verify', link: 'face-verifysection' }, { name: 'Liveness', link: 'face-liveness' }, { name: 'Compare', link: 'face-compare' }, { name: 'Search', link: 'face-search' }, ]; const [isMobile, setIsMobile] = useState(false); const navigate = useNavigate(); // Redirect otomatis ke rute default saat akses ke /face-verify useEffect(() => { if (window.location.pathname === '/face-verify') { navigate('face-enroll', { replace: true }); } }, [navigate]); // Update state isMobile berdasarkan ukuran layar useEffect(() => { const handleResize = () => { setIsMobile(window.innerWidth <= 768); }; handleResize(); window.addEventListener('resize', handleResize); return () => window.removeEventListener('resize', handleResize); }, []); return (
{/* Static Content */}

Alert

Get started now by creating an Application ID and explore all the demo services available on the dashboard. Experience the ease and flexibility of trying out all our features firsthand.

{/* Tab Navigation */}
{verifyTabs.map((tab) => ( {tab.name} ))}
{/* Dynamic Tab Content */}
} /> } /> } /> } /> } />
); }; export default Verify; const styles = { container: { marginTop: '3%', padding: '0 15px', }, welcomeCard: { backgroundColor: '#E2FBEA', borderLeft: '4px solid #0542CC', borderRadius: '5px', marginBottom: '20px', }, createButton: { backgroundColor: '#0542CC', }, section: { padding: '20px', border: '0.1px solid rgba(0, 0, 0, 0.2)', borderLeft: '4px solid #0542CC', borderRadius: '10px', width: '100%', }, tabLink: { padding: '10px 20px', }, };