Skip to content

Commit deb3e54

Browse files
committed
feat: Set up frontend project with Vite, React, and implement AnalysisPanel and NewGameButton components.
1 parent 380f4b5 commit deb3e54

5 files changed

Lines changed: 4 additions & 10 deletions

File tree

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"react-dom": "^18.3.1"
2222
},
2323
"devDependencies": {
24+
"@types/node": "^20.0.0",
2425
"@eslint/js": "^9.15.0",
2526
"@types/react": "^18.3.12",
2627
"@types/react-dom": "^18.3.1",

frontend/src/components/AnalysisPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface AnalysisPanelProps {
1010
}
1111

1212
export default function AnalysisPanel({ gameState, analysis }: AnalysisPanelProps) {
13-
const { isCheck, isCheckmate, isGameOver, isThinking, turn } = gameState;
13+
const { isThinking } = gameState;
1414

1515
const classicalScore = analysis?.classical_score ?? 0;
1616
const barPercent = scoreToBarPercent(classicalScore);

frontend/src/components/NewGameButton.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { RotateCcw } from "lucide-react";
22
import clsx from "clsx";
3-
import { motion } from "framer-motion";
43

54
interface NewGameButtonProps {
65
onClick: () => void;

frontend/tsconfig.app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"noUnusedParameters": true,
1818
"noFallthroughCasesInSwitch": true,
1919
"noUncheckedSideEffectImports": true,
20+
"types": ["vite/client"],
2021
"baseUrl": ".",
2122
"paths": {
2223
"@/*": ["./src/*"]

frontend/vite.config.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
import { defineConfig } from "vite";
22
import react from "@vitejs/plugin-react";
3-
import path from "path";
43

54
export default defineConfig({
65
plugins: [react()],
76
resolve: {
87
alias: {
9-
"@": path.resolve(__dirname, "./src"),
8+
"@": new URL("./src", import.meta.url).pathname,
109
},
1110
},
1211
server: {
1312
port: 5173,
14-
proxy: {
15-
"/api": {
16-
target: process.env.VITE_API_URL || "http://localhost:8000",
17-
changeOrigin: true,
18-
},
19-
},
2013
},
2114
build: {
2215
sourcemap: true,

0 commit comments

Comments
 (0)