"use client"; import Link from "next/link"; import { useEffect, useRef } from "react"; import { useGameStore } from "@/store/gameStore"; import type { ProblemCount } from "@/store/gameStore"; const problemCounts: ProblemCount[] = [5, 10]; const bracketKinds = [ { label: "()", name: "소괄호", selected: true, disabled: false, }, { label: "{}", name: "중괄호", selected: false, disabled: true, }, { label: "[]", name: "대괄호", selected: false, disabled: true, }, ]; export default function NumberParenthesesClient() { const startLinkRef = useRef(null); const selectedProblemCount = useGameStore( (state) => state.selectedProblemCount, ); const setProblemCount = useGameStore((state) => state.setProblemCount); const initSession = useGameStore((state) => state.initSession); useEffect(() => { startLinkRef.current?.focus(); }, []); return (

숫자 괄호 학습 준비

숫자 괄호 풀기

정수로 이루어진 괄호식을 풀며 음수 분배와 부호 변화를 연습합니다.

문제 수
{problemCounts.map((count) => { const selected = selectedProblemCount === count; return ( ); })}
괄호 종류
{bracketKinds.map((bracketKind) => ( ))}
initSession(selectedProblemCount)} className="inline-flex h-12 items-center justify-center rounded-md bg-emerald-700 px-6 text-base font-semibold text-white transition hover:bg-emerald-800 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-offset-2" > 연습 시작

현재는 소괄호 숫자 문제만 선택할 수 있습니다.

); }