refactor: useAlertStore 사용부 리팩토링
This commit is contained in:
@@ -17,7 +17,7 @@ function GeneralFileUploader<T extends { atflCd?: string | null }>({
|
||||
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<Record<string, Attachment>>(
|
||||
|
||||
@@ -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<number | null>(null);
|
||||
const [editValue, setEditValue] = useState<string>("");
|
||||
|
||||
|
||||
@@ -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 }) {
|
||||
<video src={videoUrl} controls className="object-contain" />
|
||||
</div>
|
||||
)}
|
||||
<pre className="font-noto min-h-[40rem] whitespace-pre-wrap p-8 text-2xl tracking-tighter text-foreground">
|
||||
<pre className="min-h-[40rem] whitespace-pre-wrap p-8 font-noto text-2xl tracking-tighter text-foreground">
|
||||
{postData?.pstCn ?? ""}
|
||||
</pre>
|
||||
{isFetching ? (
|
||||
|
||||
@@ -16,7 +16,7 @@ function WithPreviewFileUploader<T extends PostFormData | PostUpdateFormData>({
|
||||
form: UseFormReturn<T>;
|
||||
attachmentData?: Attachment[];
|
||||
}) {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const { bbsInfo } = useMenuStore((state) => state);
|
||||
|
||||
const [thumbnailUrl, setThumbnailUrl] = useState("");
|
||||
|
||||
Reference in New Issue
Block a user