문제 수 선택 기능 추가 - 5문제 / 10문제
This commit is contained in:
@@ -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)} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user