Skip to content

Commit fa9bdd0

Browse files
Merge pull request #81 from nka21/refactor/79
使用していないフォルダ/ファイルの整理
2 parents db1f7e6 + 653b2fd commit fa9bdd0

22 files changed

Lines changed: 102 additions & 766 deletions

apps/web/src/App.module.css

Lines changed: 0 additions & 80 deletions
This file was deleted.

apps/web/src/App.tsx

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,10 @@
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';
143

154
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-
395
return (
406
<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 />
688
</div>
699
);
7010
}

apps/web/src/AppRoutes.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
2+
3+
import { HomeScreen } from '@/web/components/home/HomeScreen';
4+
import { ModeScreen } from '@/web/components/mode/ModeScreen';
5+
import { PhotoPreview } from '@/web/components/photo/PhotoPreview';
6+
import { PhotoScreen } from '@/web/components/photo/PhotoScreen';
7+
import { ResultScreen } from '@/web/components/result/ResultScreen';
8+
9+
const router = createBrowserRouter([
10+
{
11+
path: '/',
12+
element: <HomeScreen />,
13+
},
14+
{
15+
path: '/mode',
16+
element: <ModeScreen />,
17+
},
18+
{
19+
path: '/photo',
20+
element: <PhotoScreen />,
21+
},
22+
{
23+
path: '/photo/preview',
24+
element: <PhotoPreview />,
25+
},
26+
{
27+
path: '/result',
28+
element: <ResultScreen />,
29+
},
30+
]);
31+
32+
export const AppRoutes = () => {
33+
return <RouterProvider router={router} />;
34+
};

apps/web/src/components/camera/camera.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ import {
77
} from 'react';
88

99
import styles from './camera.module.css';
10-
import type { CameraProps, CameraRef } from './types';
10+
11+
import type { CameraRef } from '@/web/types';
12+
13+
interface CameraProps {
14+
/** 撮影完了時のコールバック関数(base64形式の画像データを受け取る) */
15+
onCapture: (imageData: string) => void;
16+
}
1117

1218
/**
1319
* カメラプレビューと撮影機能を提供するコンポーネント

apps/web/src/components/camera/index.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/web/src/components/camera/types.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)