Turkcell / frontend /src /App.jsx
huseyinemretech's picture
Lite Deploy: Clean start without large files
9f48b33
Raw History Blame Contribute Delete
1.41 kB
//App.jsx
import React, { useState } from 'react';
import './App.css';
import VerificationPage from './VerificationPage.jsx';
import ManagementPage from './ManagementPage.jsx';
import EmotionVerificationPage from './EmotionVerificationPage.jsx';
import { ThemeProvider } from './ThemeContext.jsx';
import ThemeToggle from './ThemeToggle.jsx';
const App = () => {
const [currentPage, setCurrentPage] = useState('verify');
const [verification, setVerification] = useState(null);
const handleVerified = (verificationResult) => {
setVerification(verificationResult);
setCurrentPage('manage');
};
const handleBackToVerify = () => {
setCurrentPage('verify');
setVerification(null);
};
const openEmotionPage = () => {
setCurrentPage('emotion');
};
const backToManage = () => {
setCurrentPage('manage');
};
return (
<ThemeProvider>
<div className="App">
<ThemeToggle />
{currentPage === 'verify' && (
<VerificationPage onVerified={handleVerified} />
)}
{currentPage === 'manage' && (
<ManagementPage verification={verification} onBack={handleBackToVerify} onOpenEmotion={openEmotionPage} />
)}
{currentPage === 'emotion' && (
<EmotionVerificationPage verification={verification} onBack={backToManage} />
)}
</div>
</ThemeProvider>
);
};
export default App;