"use client"; import Link from "next/link"; import { useEffect, useRef } from "react"; import { useVariableGameStore, type VariableProblemCount, } from "@/store/variableGameStore"; const problemCounts: VariableProblemCount[] = [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 VariableParenthesesClient() { const startLinkRef = useRef(null); const selectedProblemCount = useVariableGameStore( (state) => state.selectedProblemCount, ); const setProblemCount = useVariableGameStore( (state) => state.setProblemCount, ); const initSession = useVariableGameStore((state) => state.initSession); useEffect(() => { startLinkRef.current?.focus(); }, []); return (

미지수 괄호 학습 준비

미지수 괄호 풀기

괄호 안의 한 항에 미지수 x가 들어간 식을 풀며 부호 변화를 연습합니다.

문제 수
{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" > 연습 시작

현재는 소괄호와 미지수 x 문제만 선택할 수 있습니다.

); }