Spaces:
Paused
Paused
Download frontend/src/App.jsx from karimlayiz/Turkcell: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/spaces/karimlayiz/Turkcell/resolve/main/frontend/src/App.jsx
- Command line
-
hf download hf://spaces/karimlayiz/Turkcell/frontend/src/App.jsx
-
curl -L -o App.jsx https://huggingface.co/spaces/karimlayiz/Turkcell/resolve/main/frontend/src/App.jsx
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; | |