Skip to content

Commit 5ccef4b

Browse files
committed
refactor(graduate): message를 useToast 훅으로 변경
1 parent 890842f commit 5ccef4b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

apps/graduate/src/pages/admin/filePreview/ui/FilePreviewPage.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useNavigate, useSearch } from '@tanstack/react-router';
2-
import { Button, message, Spin } from 'antd';
2+
import { Button, Spin } from 'antd';
33

44
import { KEYS, ROUTE } from '~/shared/constants';
5-
import { useUpdateGraduationUsersBatchApprove } from '~/shared/hooks';
5+
import { useToast, useUpdateGraduationUsersBatchApprove } from '~/shared/hooks';
66
import { queryClient } from '~/shared/utils';
77

88
import { useStudentDetail } from '~/features/studentDetail';
@@ -16,6 +16,7 @@ import * as style from '../styles/PreviewPage.css';
1616

1717
export default function FilePreviewPage() {
1818
const navigate = useNavigate();
19+
const { toast } = useToast();
1920
const { fileId, type } = useSearch({
2021
from: '/_afterLogin/file-preview',
2122
});
@@ -46,7 +47,7 @@ export default function FilePreviewPage() {
4647
const { approveGraduationUsers, mutation: approvalMutation } =
4748
useUpdateGraduationUsersBatchApprove({
4849
onSuccess: async () => {
49-
message.success('승인이 완료되었습니다.');
50+
toast.success('승인이 완료되었습니다.');
5051
await queryClient.invalidateQueries({
5152
queryKey: [KEYS.STUDENT_FILE],
5253
});
@@ -65,7 +66,7 @@ export default function FilePreviewPage() {
6566
try {
6667
await approveGraduationUsers([graduationUserid]);
6768
} catch (error) {
68-
message.error('승인에 실패했습니다.');
69+
toast.error('승인에 실패했습니다.');
6970
}
7071
};
7172

0 commit comments

Comments
 (0)