Skip to content

Commit 1edae74

Browse files
committed
HotFix: fix React library missing error
1 parent e4bdd27 commit 1edae74

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/components/study/dashboard/admin/detail/ReviewApplication.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { useState, useEffect } from 'react';
3+
import { useState, useEffect, useCallback } from 'react';
44
import { useRouter } from 'next/navigation';
55
import { Spinner } from "@nextui-org/react";
66

@@ -148,7 +148,7 @@ export default function ReviewApplication({ studyId }) {
148148
};
149149

150150
// 이벤트 핸들러
151-
const handleToggleEvent = React.useCallback((e) => {
151+
const handleToggleEvent = useCallback((e) => {
152152
const { applicantId } = e.detail;
153153
toggleSelection(applicantId);
154154
}, []);
@@ -238,7 +238,15 @@ export default function ReviewApplication({ studyId }) {
238238
console.log(`합격자: ${approved.length}명`);
239239
console.log(`불합격자: ${rejected.length}명`);
240240
alert(`${approved.length}명 합격, ${rejected.length}명 불합격 처리되었습니다.`);
241+
242+
// 로컬스토리지 데이터 삭제
241243
removeFromStorage(`sAL${studyId}Hambugi`);
244+
245+
// 버튼 비활성화 및 상태 업데이트
246+
setHasProcessedApplicants(true);
247+
setIsApprovalButtonDisabled(true);
248+
249+
// 데이터 업데이트를 위한 페이지 리로딩
242250
router.reload();
243251
return;
244252
}

0 commit comments

Comments
 (0)