+
{isWinner ? "WIN" : "GAME OVER"}
-
+
FINAL RESULT
diff --git a/client/app/room/[roomId]/_components/ingame/QuizTimerSection.tsx b/client/app/room/[roomId]/_components/ingame/QuizTimerSection.tsx
index 11293fb..c7b4d13 100644
--- a/client/app/room/[roomId]/_components/ingame/QuizTimerSection.tsx
+++ b/client/app/room/[roomId]/_components/ingame/QuizTimerSection.tsx
@@ -1,6 +1,6 @@
"use client";
-import React, { memo, useEffect } from "react";
+import { memo, useEffect } from "react";
import { useQuizTimer } from "@/hooks/useQuizTimer";
import { TimerProgressBar } from "./TimerProgressBar";
@@ -20,6 +20,7 @@ export const QuizTimerSection = memo((props: QuizTimerSectionProps) => {
});
// 問題が変わったらタイマーリセット
+ // biome-ignore lint/correctness/useExhaustiveDependencies: currentQuestionIndex triggers timer reset on question change
useEffect(() => {
resetTimer();
}, [currentQuestionIndex, resetTimer]);
@@ -27,7 +28,7 @@ export const QuizTimerSection = memo((props: QuizTimerSectionProps) => {
return (
- Score: {score}
+ Score: {score}
);
});
diff --git a/client/app/room/[roomId]/_components/ingame/TimerProgressBar.tsx b/client/app/room/[roomId]/_components/ingame/TimerProgressBar.tsx
index ccae279..8b7fc69 100644
--- a/client/app/room/[roomId]/_components/ingame/TimerProgressBar.tsx
+++ b/client/app/room/[roomId]/_components/ingame/TimerProgressBar.tsx
@@ -32,7 +32,7 @@ export const TimerProgressBar = memo((props: TimerProgressBarProps) => {
const isFilled = index < filledBars;
return (
diff --git a/client/app/room/_components/RoomClient.tsx b/client/app/room/_components/RoomClient.tsx
index a662e3b..8a0f65e 100644
--- a/client/app/room/_components/RoomClient.tsx
+++ b/client/app/room/_components/RoomClient.tsx
@@ -1,11 +1,11 @@
"use client";
-import { TerminalLayout } from "@/components/TerminalLayout";
+import { memo, useCallback, useEffect, useState } from "react";
+import type { ServerMessage } from "@/app/_types/api";
import { Button } from "@/components/Button";
-import { memo, useState, useCallback, useEffect } from "react";
-import { QuizGameClient } from "../[roomId]/_components/ingame/QuizGameClient";
+import { TerminalLayout } from "@/components/TerminalLayout";
import { useWebSocket } from "@/hooks/useWebSocket";
-import type { ServerMessage } from "@/app/_types/api";
+import { QuizGameClient } from "../[roomId]/_components/ingame/QuizGameClient";
type Player = {
id: string;
@@ -39,9 +39,9 @@ const PlayerCard = memo((props: { player: Player }) => {
{/* プレイヤー情報 */}
-
{player.name}
+
{player.name}
{player.isHost && (
-
+
HOST
)}
@@ -57,8 +57,8 @@ const PlayerCard = memo((props: { player: Player }) => {
*/
const EmptySlot = memo(() => {
return (
-
-
+
+
);
});
@@ -325,7 +325,7 @@ export const RoomClient = memo((props: RoomClientProps) => {
{connectionStatus === "error" && (
-
+
サーバーに接続できません。サーバーが起動しているか確認してください。
)}
@@ -380,7 +380,7 @@ export const RoomClient = memo((props: RoomClientProps) => {
{/* 空きスロットを表示 */}
{Array.from({ length: emptySlots }, (_, index) => (
-
+
))}
diff --git a/client/biome.json b/client/biome.json
new file mode 100644
index 0000000..94a060f
--- /dev/null
+++ b/client/biome.json
@@ -0,0 +1,41 @@
+{
+ "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
+ "vcs": {
+ "enabled": true,
+ "clientKind": "git",
+ "useIgnoreFile": true
+ },
+ "files": {
+ "ignoreUnknown": true,
+ "includes": ["**", "!node_modules", "!.next", "!dist", "!build"]
+ },
+ "formatter": {
+ "enabled": true,
+ "indentStyle": "space",
+ "indentWidth": 2
+ },
+ "linter": {
+ "enabled": true,
+ "rules": {
+ "recommended": true,
+ "nursery": {
+ "useSortedClasses": "error"
+ },
+ "suspicious": {
+ "noArrayIndexKey": "off",
+ "noUnknownAtRules": "off"
+ }
+ },
+ "domains": {
+ "next": "recommended",
+ "react": "recommended"
+ }
+ },
+ "assist": {
+ "actions": {
+ "source": {
+ "organizeImports": "on"
+ }
+ }
+ }
+}
diff --git a/client/components/Button.tsx b/client/components/Button.tsx
index 2f7adda..ebcd3a4 100644
--- a/client/components/Button.tsx
+++ b/client/components/Button.tsx
@@ -34,7 +34,7 @@ export const Button = memo((props: Props) => {
)}
{label}
-
{description}
+
{description}
{context !== "game" && (
{
return (
-
JOIN_ROOM
+
JOIN_ROOM
@@ -126,7 +126,7 @@ export const JoinModal = memo((props: JoinModalProps) => {
value={roomId}
onChange={handleInputChange}
onKeyDown={handleKeyDown}
- className="w-full rounded-md border border-green-400/30 bg-black/50 px-3 py-2 text-white focus:border-green-400/50 focus:ring-2 focus:ring-green-400/50 focus:outline-none"
+ className="w-full rounded-md border border-green-400/30 bg-black/50 px-3 py-2 text-white focus:border-green-400/50 focus:outline-none focus:ring-2 focus:ring-green-400/50"
placeholder="ルームIDを入力してください"
disabled={isLoading}
/>
@@ -140,6 +140,7 @@ export const JoinModal = memo((props: JoinModalProps) => {
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
+ aria-hidden="true"
>
{
d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
- {errorMessage}
+ {errorMessage}
)}
@@ -156,6 +157,7 @@ export const JoinModal = memo((props: JoinModalProps) => {