Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bbb1674
refactor: `App.tsx` のコメントアウトを削除
nkoji21 Jul 27, 2025
8c25496
refactor: `index.tsx` を削除
nkoji21 Jul 27, 2025
b813269
refactor: `index.tsx` を削除
nkoji21 Jul 27, 2025
d8986b8
refactor: `HomeScreen.tsx` のパスを調整
nkoji21 Jul 27, 2025
8898f76
refactor: `ModeScreen.tsx` のパスを修正
nkoji21 Jul 27, 2025
4e7a526
refactor: `PhotoScreen.tsx` の importパスを調整
nkoji21 Jul 27, 2025
98d77b7
refactor: `ResultScreen.tsx` のパスを調整
nkoji21 Jul 27, 2025
b426364
refactor: `camera/`types.ts` に書かれてある、型定義を `types/` ディレクトリに移動
nkoji21 Jul 27, 2025
5ff4f20
refactor: `camera.tsx` に `CameraProps` インターフェースを追加し、型定義を `types/` ディレ…
nkoji21 Jul 27, 2025
dd5070f
refactor: `camera/` の 型定義ファイルが他で使用されていないため削除
nkoji21 Jul 27, 2025
c1eca4f
refactor: `PhotoScreen.tsx` の型定義のインポートパスを `types/` ディレクトリに変更
nkoji21 Jul 27, 2025
d64a01e
refactor: 現状使用していない、`game/` ディレクトリの削除
nkoji21 Jul 27, 2025
5ce5c8e
refactor: `wrangler.jsonc` から未使用の環境変数を削除
nkoji21 Jul 27, 2025
d9aeccb
refactor: ルーティングを `AppRoutes.tsx` に移行し、`App.tsx` を簡素化
nkoji21 Jul 27, 2025
1204e1c
chore: formatを適用
nkoji21 Jul 27, 2025
b5eb18e
refactor: global css を `src/styles` に整理
nkoji21 Jul 27, 2025
a684b79
refactor: import修正
nkoji21 Jul 27, 2025
ddb455a
refactor: 使用されていないCSSスタイルを削除
nkoji21 Jul 27, 2025
653b2fd
refactor: 使用されていないピクセルアート風のCSSスタイルを削除
nkoji21 Jul 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions apps/web/src/App.module.css

This file was deleted.

66 changes: 3 additions & 63 deletions apps/web/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,10 @@
// import { useState } from 'react';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';

import { AnimatePresence } from 'framer-motion';

import styles from './App.module.css';
import { HomeScreen } from './components/home/HomeScreen';
import { ModeScreen } from './components/mode/ModeScreen';
import { PhotoPreview } from './components/photo/PhotoPreview';
import { PhotoScreen } from './components/photo/PhotoScreen';
// import { ShootingScreen } from './components/game/shooting-screen';
// import type { JudgeResult, Theme } from './components/game/types';
import { ResultScreen } from './components/result/ResultScreen';
import { AppRoutes } from '@/web/AppRoutes';
import styles from '@/web/styles/App.module.css';

function App() {
// // テスト用のお題データ
// const testTheme: Theme = {
// id: 1,
// difficulty: 'NORMAL',
// theme: 'テスト', // 実際は1・2枚目から渡される
// aiCondition: { label: 'Test' },
// };

// const [showShooting, setShowShooting] = useState(true);
// const [result, setResult] = useState<JudgeResult | null>(null);

// const handleComplete = (judgeResult: JudgeResult) => {
// setResult(judgeResult);
// setShowShooting(false);
// console.log('撮影完了:', judgeResult);
// // 実際は4枚目(結果画面)に遷移
// };

// const handleRetry = () => {
// setResult(null);
// setShowShooting(true);
// };

return (
<div className={styles['phone-container']}>
<Router>
<AnimatePresence mode="wait">
<Routes>
<Route path="/" element={<HomeScreen />} />
<Route path="/mode" element={<ModeScreen />} />
<Route path="/photo" element={<PhotoScreen />} />
<Route path="/photo/preview" element={<PhotoPreview />} />
<Route path="/result" element={<ResultScreen />} />
</Routes>
</AnimatePresence>
</Router>
{/* {showShooting ? (
<ShootingScreen theme={testTheme} onComplete={handleComplete} />
) : (
<div className={styles.testResult}>
<h1 className={styles.testResultTitle}>テスト完了</h1>
{result && (
<div className={styles.testResultContent}>
<p>スコア: {(result.label_score * 100).toFixed(1)}%</p>
<p>結果: {result.success ? '成功' : '失敗'}</p>
</div>
)}
<button className={styles.testResultButton} onClick={handleRetry}>
もう一度テスト
</button>
</div>
)} */}
<AppRoutes />
</div>
);
}
Expand Down
34 changes: 34 additions & 0 deletions apps/web/src/AppRoutes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { createBrowserRouter, RouterProvider } from 'react-router-dom';

import { HomeScreen } from '@/web/components/home/HomeScreen';
import { ModeScreen } from '@/web/components/mode/ModeScreen';
import { PhotoPreview } from '@/web/components/photo/PhotoPreview';
import { PhotoScreen } from '@/web/components/photo/PhotoScreen';
import { ResultScreen } from '@/web/components/result/ResultScreen';

const router = createBrowserRouter([
{
path: '/',
element: <HomeScreen />,
},
{
path: '/mode',
element: <ModeScreen />,
},
{
path: '/photo',
element: <PhotoScreen />,
},
{
path: '/photo/preview',
element: <PhotoPreview />,
},
{
path: '/result',
element: <ResultScreen />,
},
]);

export const AppRoutes = () => {
return <RouterProvider router={router} />;
};
8 changes: 7 additions & 1 deletion apps/web/src/components/camera/camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import {
} from 'react';

import styles from './camera.module.css';
import type { CameraProps, CameraRef } from './types';

import type { CameraRef } from '@/web/types';

interface CameraProps {
/** 撮影完了時のコールバック関数(base64形式の画像データを受け取る) */
onCapture: (imageData: string) => void;
}

/**
* カメラプレビューと撮影機能を提供するコンポーネント
Expand Down
5 changes: 0 additions & 5 deletions apps/web/src/components/camera/index.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions apps/web/src/components/camera/types.ts

This file was deleted.

Loading