리펙토링: 코드 최적화

This commit is contained in:
2026-05-26 15:29:50 +09:00
parent 2779bf1b0e
commit 4a08dded14
3 changed files with 11 additions and 7 deletions
+6 -2
View File
@@ -3,11 +3,15 @@ import type { ProblemCount } from "@/store/gameStore";
interface PlayPageProps {
searchParams?: {
count?: string;
count?: string | string[];
};
}
function parseProblemCount(count?: string): ProblemCount {
function parseProblemCount(count?: string | string[]): ProblemCount {
if (Array.isArray(count)) {
return parseProblemCount(count[0]);
}
return count === "5" ? 5 : 10;
}