feat: 컨펌 & 얼럿 다이얼로그 스토어 생성

This commit is contained in:
2025-03-19 15:54:20 +09:00
parent 25a2ac5716
commit 6f0e1a6e40
7 changed files with 120 additions and 3 deletions
@@ -1,9 +1,11 @@
"use client";
import { createContext, useRef } from "react";
import { createUserStore } from "@/shared/store/user-store";
import { createAlertStore } from "../store/alert-store";
import { createUserStore } from "../store/user-store";
type StoreContextType = {
alertStore: ReturnType<typeof createAlertStore>;
userStore: ReturnType<typeof createUserStore>;
};
@@ -15,6 +17,7 @@ export const StoreProvider = ({ children }: { children: React.ReactNode }) => {
const storeRef = useRef<StoreContextType | null>(null);
if (storeRef.current === null) {
storeRef.current = {
alertStore: createAlertStore(),
userStore: createUserStore(),
};
}