feat: initial commit

This commit is contained in:
2026-04-12 01:20:57 +07:00
parent 10d660cbcb
commit 28e866a64e
43 changed files with 954 additions and 0 deletions

27
src/store/test-store.ts Normal file
View File

@@ -0,0 +1,27 @@
import { create } from "zustand"
import { persist } from "zustand/middleware"
interface TestState {
// Shell — filled during TOEIC feature implementation
currentPart: number | null
answers: Record<string, string>
setCurrentPart: (part: number | null) => void
setAnswer: (questionId: string, answer: string) => void
reset: () => void
}
export const useTestStore = create<TestState>()(
persist(
(set) => ({
currentPart: null,
answers: {},
setCurrentPart: (part) => set({ currentPart: part }),
setAnswer: (questionId, answer) =>
set((state) => ({
answers: { ...state.answers, [questionId]: answer },
})),
reset: () => set({ currentPart: null, answers: {} }),
}),
{ name: "test-store" },
),
)