[st] feat: 입력 - 제출 시 imr 요청 및 상태 확인, 진행 progress bar 추가

This commit is contained in:
2026-04-21 17:57:00 +09:00
parent d0a808882d
commit 9c7e71e65a
19 changed files with 273 additions and 72 deletions
+1
View File
@@ -2,6 +2,7 @@ export { getCookie, setCookie, removeCookie } from "./cookie";
export { useMutationWrapper } from "./use-mutation-wrapper";
export { useAlertStore } from "./use-alert-store";
export { useDataTable } from "./use-data-table";
export { useGlobalProgressStore } from "./use-global-progress-store";
export { useMenuStore } from "./use-menu-store";
export { useUserStore } from "./use-user-store";
export { usePrompt } from "./use-prompt";
@@ -0,0 +1,16 @@
import { useContext } from "react";
import { useStore } from "zustand";
import type { GlobalProgressStore } from "../store/global-progress-store";
import { StoreContext } from "../providers/store-provider";
export const useGlobalProgressStore = <T>(
selector: (store: GlobalProgressStore) => T,
): T => {
const storeContext = useContext(StoreContext);
if (!storeContext) {
throw new Error("useGlobalProgressStore must be used within StoreProvider");
}
return useStore(storeContext.globalProgressStore, selector);
};