260515_01_ENH: 클라이언트 수정사항 반영 및 다른 조사들 data 연결

This commit is contained in:
2026-05-15 14:36:58 +09:00
parent fcca4a0be7
commit b041a25e47
39 changed files with 1819 additions and 941 deletions

View File

@@ -0,0 +1,24 @@
"use client";
import { useCallback } from "react";
import { useAtom } from "jotai";
import { layoutSelectedMenuAtom } from "@/store/jotai/layout";
export const useLayoutSelectedMenu = () => {
const [selectedMenusByTopMenu, setSelectedMenusByTopMenu] = useAtom(layoutSelectedMenuAtom);
const selectMenu = useCallback(
(topMenuId: string, menuId: string) => {
setSelectedMenusByTopMenu((prev) => ({
...prev,
[topMenuId]: menuId,
}));
},
[setSelectedMenusByTopMenu],
);
return {
selectedMenusByTopMenu,
selectMenu,
};
};