File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/components/study/dashboard/admin/detail Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11'use client' ;
22
3- import { useState , useEffect } from 'react' ;
3+ import { useState , useEffect , useCallback } from 'react' ;
44import { useRouter } from 'next/navigation' ;
55import { 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 }
You can’t perform that action at this time.
0 commit comments