11import { useNavigate , useSearch } from '@tanstack/react-router' ;
2- import { Button , message , Spin } from 'antd' ;
2+ import { Button , Spin } from 'antd' ;
33
44import { KEYS , ROUTE } from '~/shared/constants' ;
5- import { useUpdateGraduationUsersBatchApprove } from '~/shared/hooks' ;
5+ import { useToast , useUpdateGraduationUsersBatchApprove } from '~/shared/hooks' ;
66import { queryClient } from '~/shared/utils' ;
77
88import { useStudentDetail } from '~/features/studentDetail' ;
@@ -16,6 +16,7 @@ import * as style from '../styles/PreviewPage.css';
1616
1717export 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