숫자 괄호 학습 준비의 play 폴더 위치 변경

This commit is contained in:
2026-05-30 17:16:53 +09:00
parent f3d051cdd1
commit e0d8fc19d5
5 changed files with 17 additions and 13 deletions
@@ -0,0 +1,22 @@
import NumberPlayClient from "./NumberPlayClient";
import type { ProblemCount } from "@/store/gameStore";
interface NumberPlayPageProps {
searchParams?: {
count?: string | string[];
};
}
function parseProblemCount(count?: string | string[]): ProblemCount {
if (Array.isArray(count)) {
return parseProblemCount(count[0]);
}
return count === "5" ? 5 : 10;
}
export default function NumberPlayPage({ searchParams }: NumberPlayPageProps) {
return (
<NumberPlayClient problemCount={parseProblemCount(searchParams?.count)} />
);
}