|
1 | | -// import { useState } from 'react'; |
2 | | -import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; |
3 | | - |
4 | | -import { AnimatePresence } from 'framer-motion'; |
5 | | - |
6 | | -import styles from './App.module.css'; |
7 | | -import { HomeScreen } from './components/home/HomeScreen'; |
8 | | -import { ModeScreen } from './components/mode/ModeScreen'; |
9 | | -import { PhotoPreview } from './components/photo/PhotoPreview'; |
10 | | -import { PhotoScreen } from './components/photo/PhotoScreen'; |
11 | | -// import { ShootingScreen } from './components/game/shooting-screen'; |
12 | | -// import type { JudgeResult, Theme } from './components/game/types'; |
13 | | -import { ResultScreen } from './components/result/ResultScreen'; |
| 1 | +import { AppRoutes } from '@/web/AppRoutes'; |
| 2 | +import styles from '@/web/styles/App.module.css'; |
14 | 3 |
|
15 | 4 | function App() { |
16 | | - // // テスト用のお題データ |
17 | | - // const testTheme: Theme = { |
18 | | - // id: 1, |
19 | | - // difficulty: 'NORMAL', |
20 | | - // theme: 'テスト', // 実際は1・2枚目から渡される |
21 | | - // aiCondition: { label: 'Test' }, |
22 | | - // }; |
23 | | - |
24 | | - // const [showShooting, setShowShooting] = useState(true); |
25 | | - // const [result, setResult] = useState<JudgeResult | null>(null); |
26 | | - |
27 | | - // const handleComplete = (judgeResult: JudgeResult) => { |
28 | | - // setResult(judgeResult); |
29 | | - // setShowShooting(false); |
30 | | - // console.log('撮影完了:', judgeResult); |
31 | | - // // 実際は4枚目(結果画面)に遷移 |
32 | | - // }; |
33 | | - |
34 | | - // const handleRetry = () => { |
35 | | - // setResult(null); |
36 | | - // setShowShooting(true); |
37 | | - // }; |
38 | | - |
39 | 5 | return ( |
40 | 6 | <div className={styles['phone-container']}> |
41 | | - <Router> |
42 | | - <AnimatePresence mode="wait"> |
43 | | - <Routes> |
44 | | - <Route path="/" element={<HomeScreen />} /> |
45 | | - <Route path="/mode" element={<ModeScreen />} /> |
46 | | - <Route path="/photo" element={<PhotoScreen />} /> |
47 | | - <Route path="/photo/preview" element={<PhotoPreview />} /> |
48 | | - <Route path="/result" element={<ResultScreen />} /> |
49 | | - </Routes> |
50 | | - </AnimatePresence> |
51 | | - </Router> |
52 | | - {/* {showShooting ? ( |
53 | | - <ShootingScreen theme={testTheme} onComplete={handleComplete} /> |
54 | | - ) : ( |
55 | | - <div className={styles.testResult}> |
56 | | - <h1 className={styles.testResultTitle}>テスト完了</h1> |
57 | | - {result && ( |
58 | | - <div className={styles.testResultContent}> |
59 | | - <p>スコア: {(result.label_score * 100).toFixed(1)}%</p> |
60 | | - <p>結果: {result.success ? '成功' : '失敗'}</p> |
61 | | - </div> |
62 | | - )} |
63 | | - <button className={styles.testResultButton} onClick={handleRetry}> |
64 | | - もう一度テスト |
65 | | - </button> |
66 | | - </div> |
67 | | - )} */} |
| 7 | + <AppRoutes /> |
68 | 8 | </div> |
69 | 9 | ); |
70 | 10 | } |
|
0 commit comments