Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/study/create/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 10 additions & 2 deletions src/components/study/dashboard/admin/detail/ReviewApplication.jsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -148,7 +148,7 @@ export default function ReviewApplication({ studyId }) {
};

// 이벤트 핸들러
const handleToggleEvent = React.useCallback((e) => {
const handleToggleEvent = useCallback((e) => {
const { applicantId } = e.detail;
toggleSelection(applicantId);
}, []);
Expand Down Expand Up @@ -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;
}
Expand Down