diff --git a/src/app/study/create/page.jsx b/src/app/study/create/page.jsx index c1cf349..e753f42 100644 --- a/src/app/study/create/page.jsx +++ b/src/app/study/create/page.jsx @@ -68,7 +68,7 @@ export default function CreateStudy() { try { const imageFile = formData.image; - const s3key = `/study/`; + const s3key = `study`; const s3Form = new FormData(); s3Form.append('file', imageFile); diff --git a/src/components/study/dashboard/admin/detail/ReviewApplication.jsx b/src/components/study/dashboard/admin/detail/ReviewApplication.jsx index ef16937..53f6b50 100644 --- a/src/components/study/dashboard/admin/detail/ReviewApplication.jsx +++ b/src/components/study/dashboard/admin/detail/ReviewApplication.jsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useEffect } from 'react'; +import { useState, useEffect, useCallback } from 'react'; import { useRouter } from 'next/navigation'; import { Spinner } from "@nextui-org/react"; @@ -148,7 +148,7 @@ export default function ReviewApplication({ studyId }) { }; // 이벤트 핸들러 - const handleToggleEvent = React.useCallback((e) => { + const handleToggleEvent = useCallback((e) => { const { applicantId } = e.detail; toggleSelection(applicantId); }, []); @@ -238,7 +238,15 @@ export default function ReviewApplication({ studyId }) { console.log(`합격자: ${approved.length}명`); console.log(`불합격자: ${rejected.length}명`); alert(`${approved.length}명 합격, ${rejected.length}명 불합격 처리되었습니다.`); + + // 로컬스토리지 데이터 삭제 removeFromStorage(`sAL${studyId}Hambugi`); + + // 버튼 비활성화 및 상태 업데이트 + setHasProcessedApplicants(true); + setIsApprovalButtonDisabled(true); + + // 데이터 업데이트를 위한 페이지 리로딩 router.reload(); return; }