diff --git a/apps/common/features/src/entities/menu-authority/ui/management-authority-dialog.tsx b/apps/common/features/src/entities/menu-authority/ui/management-authority-dialog.tsx index d0b27b52c..b85c182b5 100644 --- a/apps/common/features/src/entities/menu-authority/ui/management-authority-dialog.tsx +++ b/apps/common/features/src/entities/menu-authority/ui/management-authority-dialog.tsx @@ -33,7 +33,7 @@ function ManagementAuthorityDialog({ ...props }: ManagementAuthorityDialogProps) { const { confirm } = useConfirm(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { data: menuAuthorityList } = useQuery({ queryKey: [ENDPOINT.CMS_SERVICE.MENU_AUTHRTS, menuCd], diff --git a/apps/common/features/src/entities/menu/lib/menu-wrapper.tsx b/apps/common/features/src/entities/menu/lib/menu-wrapper.tsx index 277cae8d3..1615dd572 100644 --- a/apps/common/features/src/entities/menu/lib/menu-wrapper.tsx +++ b/apps/common/features/src/entities/menu/lib/menu-wrapper.tsx @@ -13,7 +13,7 @@ const MenuWrapper = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); const pathname = usePathname(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { pageMenuAuthority, setBbsInfo, diff --git a/apps/common/features/src/entities/posting/ui/posting-dialog.tsx b/apps/common/features/src/entities/posting/ui/posting-dialog.tsx index e125eb7a8..6bc8a02a7 100644 --- a/apps/common/features/src/entities/posting/ui/posting-dialog.tsx +++ b/apps/common/features/src/entities/posting/ui/posting-dialog.tsx @@ -61,7 +61,7 @@ const POSTING_TYPE_LABEL = { function PostingDialog({ postingType, postingTargets }: PostingDialogProps) { const { confirm } = useConfirm(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const [selectedRows, setSelectedRows] = useState([]); const [rememberPeriodCode, setRememberPeriodCode] = useState< Record diff --git a/apps/common/features/src/pages/(pst)/faq/ui/create-page.tsx b/apps/common/features/src/pages/(pst)/faq/ui/create-page.tsx index 8b564cad4..92c70b707 100644 --- a/apps/common/features/src/pages/(pst)/faq/ui/create-page.tsx +++ b/apps/common/features/src/pages/(pst)/faq/ui/create-page.tsx @@ -11,7 +11,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function CreatePage({ bbsId }: { bbsId: string }) { const router = useRouter(); const { userInfo } = useUserStore((state) => state); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { mutateAsync: createPost } = useMutation({ mutationFn: (data: PostFormData) => PostApi.createPost(data), diff --git a/apps/common/features/src/pages/(pst)/faq/ui/faq-page.tsx b/apps/common/features/src/pages/(pst)/faq/ui/faq-page.tsx index a5d7129d0..c0281504c 100644 --- a/apps/common/features/src/pages/(pst)/faq/ui/faq-page.tsx +++ b/apps/common/features/src/pages/(pst)/faq/ui/faq-page.tsx @@ -32,7 +32,7 @@ function FaqPage({ bbsId }: { bbsId: string }) { const pathname = usePathname(); const { confirm } = useConfirm(); const { userInfo } = useUserStore((state) => state); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { bbsInfo, pageMenuAuthority } = useMenuStore((state) => state); const [postParams, setPostParams] = useState({ diff --git a/apps/common/features/src/pages/(pst)/faq/ui/modify-page.tsx b/apps/common/features/src/pages/(pst)/faq/ui/modify-page.tsx index 7f56031d9..244d30c4b 100644 --- a/apps/common/features/src/pages/(pst)/faq/ui/modify-page.tsx +++ b/apps/common/features/src/pages/(pst)/faq/ui/modify-page.tsx @@ -15,7 +15,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function ModifyPage({ bbsId, pstNo }: { bbsId: string; pstNo: string }) { const router = useRouter(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { userInfo } = useUserStore((state) => state); const { data: postInfo } = useQuery({ diff --git a/apps/common/features/src/pages/(pst)/image/ui/create-page.tsx b/apps/common/features/src/pages/(pst)/image/ui/create-page.tsx index 0efcd2c30..6931a96d0 100644 --- a/apps/common/features/src/pages/(pst)/image/ui/create-page.tsx +++ b/apps/common/features/src/pages/(pst)/image/ui/create-page.tsx @@ -11,7 +11,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function CreatePage({ bbsId }: { bbsId: string }) { const router = useRouter(); const { userInfo } = useUserStore((state) => state); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { mutateAsync: createPost } = useMutation({ mutationFn: (data: PostFormData) => PostApi.createPost(data), diff --git a/apps/common/features/src/pages/(pst)/image/ui/modify-page.tsx b/apps/common/features/src/pages/(pst)/image/ui/modify-page.tsx index 8b09be8c3..01fcd3055 100644 --- a/apps/common/features/src/pages/(pst)/image/ui/modify-page.tsx +++ b/apps/common/features/src/pages/(pst)/image/ui/modify-page.tsx @@ -15,7 +15,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function ModifyPage({ bbsId, pstNo }: { bbsId: string; pstNo: string }) { const router = useRouter(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { userInfo } = useUserStore((state) => state); const { data: postInfo } = useQuery({ diff --git a/apps/common/features/src/pages/(pst)/movie/ui/create-page.tsx b/apps/common/features/src/pages/(pst)/movie/ui/create-page.tsx index f7e2e837f..2103bf6c8 100644 --- a/apps/common/features/src/pages/(pst)/movie/ui/create-page.tsx +++ b/apps/common/features/src/pages/(pst)/movie/ui/create-page.tsx @@ -11,7 +11,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function CreatePage({ bbsId }: { bbsId: string }) { const router = useRouter(); const { userInfo } = useUserStore((state) => state); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { mutateAsync: createPost } = useMutation({ mutationFn: (data: PostFormData) => PostApi.createPost(data), diff --git a/apps/common/features/src/pages/(pst)/movie/ui/modify-page.tsx b/apps/common/features/src/pages/(pst)/movie/ui/modify-page.tsx index 6bbdd8d94..90ad811ca 100644 --- a/apps/common/features/src/pages/(pst)/movie/ui/modify-page.tsx +++ b/apps/common/features/src/pages/(pst)/movie/ui/modify-page.tsx @@ -15,7 +15,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function ModifyPage({ bbsId, pstNo }: { bbsId: string; pstNo: string }) { const router = useRouter(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { userInfo } = useUserStore((state) => state); const { data: postInfo } = useQuery({ diff --git a/apps/common/features/src/pages/(pst)/normal/ui/create-page.tsx b/apps/common/features/src/pages/(pst)/normal/ui/create-page.tsx index c5cbf7923..ce6bc6c8a 100644 --- a/apps/common/features/src/pages/(pst)/normal/ui/create-page.tsx +++ b/apps/common/features/src/pages/(pst)/normal/ui/create-page.tsx @@ -13,7 +13,7 @@ function CreatePage({ bbsId, pstNo }: { bbsId: string; pstNo?: string }) { const router = useRouter(); const { userInfo } = useUserStore((state) => state); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { mutateAsync: createPost } = useMutation({ mutationFn: (data: PostFormData) => PostApi.createPost(data), diff --git a/apps/common/features/src/pages/(pst)/normal/ui/modify-page.tsx b/apps/common/features/src/pages/(pst)/normal/ui/modify-page.tsx index e0d1834d4..2c59ecff2 100644 --- a/apps/common/features/src/pages/(pst)/normal/ui/modify-page.tsx +++ b/apps/common/features/src/pages/(pst)/normal/ui/modify-page.tsx @@ -15,7 +15,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function ModifyPage({ bbsId, pstNo }: { bbsId: string; pstNo: string }) { const router = useRouter(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { userInfo } = useUserStore((state) => state); const { data: postInfo } = useQuery({ diff --git a/apps/common/features/src/pages/(pst)/notice/ui/create-page.tsx b/apps/common/features/src/pages/(pst)/notice/ui/create-page.tsx index 37c21cb0d..a0206f449 100644 --- a/apps/common/features/src/pages/(pst)/notice/ui/create-page.tsx +++ b/apps/common/features/src/pages/(pst)/notice/ui/create-page.tsx @@ -11,7 +11,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function CreatePage({ bbsId }: { bbsId: string }) { const router = useRouter(); const { userInfo } = useUserStore((state) => state); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { mutateAsync: createPost } = useMutation({ mutationFn: (data: PostFormData) => PostApi.createPost(data), diff --git a/apps/common/features/src/pages/(pst)/notice/ui/modify-page.tsx b/apps/common/features/src/pages/(pst)/notice/ui/modify-page.tsx index 9fe65782d..3c1c517dc 100644 --- a/apps/common/features/src/pages/(pst)/notice/ui/modify-page.tsx +++ b/apps/common/features/src/pages/(pst)/notice/ui/modify-page.tsx @@ -15,7 +15,7 @@ import { useAlertStore, useUserStore } from "@/shared/lib"; function ModifyPage({ bbsId, pstNo }: { bbsId: string; pstNo: string }) { const router = useRouter(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { userInfo } = useUserStore((state) => state); const { data: postInfo } = useQuery({ diff --git a/apps/common/features/src/shared/ui/alert-dialog.tsx b/apps/common/features/src/shared/ui/alert-dialog.tsx index 012d4ab86..3bd4fece8 100644 --- a/apps/common/features/src/shared/ui/alert-dialog.tsx +++ b/apps/common/features/src/shared/ui/alert-dialog.tsx @@ -6,7 +6,6 @@ import { Button, } from "@common/components"; import { useAlertStore } from "../lib/use-alert-store"; - function AlertDialog() { const { message, callback, setMessage } = useAlertStore((state) => state); const handleOpenChange = () => { diff --git a/apps/common/features/src/widgets/post/ui/general-file-uploader.tsx b/apps/common/features/src/widgets/post/ui/general-file-uploader.tsx index 90edbc58b..24998ec58 100644 --- a/apps/common/features/src/widgets/post/ui/general-file-uploader.tsx +++ b/apps/common/features/src/widgets/post/ui/general-file-uploader.tsx @@ -17,7 +17,7 @@ function GeneralFileUploader({ deleteAttachmentIds: string[]; setDeleteAttachmentIds: (deleteAttachmentIds: string[]) => void; }) { - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { bbsInfo } = useMenuStore((state) => state); const [attachments, setAttachments] = useState>( diff --git a/apps/common/features/src/widgets/post/ui/post-comment.tsx b/apps/common/features/src/widgets/post/ui/post-comment.tsx index 1800b2581..8c08cfc88 100644 --- a/apps/common/features/src/widgets/post/ui/post-comment.tsx +++ b/apps/common/features/src/widgets/post/ui/post-comment.tsx @@ -20,7 +20,7 @@ function PostComment({ bbsId, pstNo }: { bbsId: number; pstNo: number }) { const { confirm } = useConfirm(); const queryClient = useQueryClient(); const { userInfo } = useUserStore((state) => state); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const [editingCmntNo, setEditingCmntNo] = useState(null); const [editValue, setEditValue] = useState(""); diff --git a/apps/common/features/src/widgets/post/ui/post.tsx b/apps/common/features/src/widgets/post/ui/post.tsx index 44e549a70..e52a65d03 100644 --- a/apps/common/features/src/widgets/post/ui/post.tsx +++ b/apps/common/features/src/widgets/post/ui/post.tsx @@ -21,7 +21,7 @@ import { PostComment } from "./post-comment"; function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) { const router = useRouter(); const { prompt } = usePrompt(); - const { setMessage: alert } = useAlertStore((state) => state); + const alert = useAlertStore((state) => state.setMessage); const { userInfo } = useUserStore((state) => state); const { bbsInfo } = useMenuStore((state) => state); @@ -168,7 +168,7 @@ function Post({ bbsId, pstNo }: { bbsId: string; pstNo: string }) {