문제 수 선택 기능 추가 - 5문제 / 10문제

This commit is contained in:
2026-05-26 15:23:21 +09:00
parent 44e4d46c6c
commit 2779bf1b0e
5 changed files with 124 additions and 22 deletions
+13 -2
View File
@@ -1,5 +1,16 @@
import PlayClient from "./PlayClient";
import type { ProblemCount } from "@/store/gameStore";
export default function PlayPage() {
return <PlayClient />;
interface PlayPageProps {
searchParams?: {
count?: string;
};
}
function parseProblemCount(count?: string): ProblemCount {
return count === "5" ? 5 : 10;
}
export default function PlayPage({ searchParams }: PlayPageProps) {
return <PlayClient problemCount={parseProblemCount(searchParams?.count)} />;
}