diff --git a/src/app/components/layout/auth/Background.tsx b/src/app/components/layout/auth/Background.tsx index d2553c3d..6d59b6e1 100644 --- a/src/app/components/layout/auth/Background.tsx +++ b/src/app/components/layout/auth/Background.tsx @@ -1,6 +1,6 @@ export default function Background({ children }: { children: React.ReactNode }) { return ( -
+
{children}
); diff --git a/src/app/components/modal/modals/apply/MyApplicationModal.tsx b/src/app/components/modal/modals/apply/MyApplicationModal.tsx index 68ac1b89..29f4e125 100644 --- a/src/app/components/modal/modals/apply/MyApplicationModal.tsx +++ b/src/app/components/modal/modals/apply/MyApplicationModal.tsx @@ -14,6 +14,7 @@ import Image from "next/image"; import { useUser } from "@/hooks/queries/user/me/useUser"; import { useGuestApplication } from "@/hooks/queries/user/me/useGuestApplication"; import Chip from "@/app/components/chip/Chip"; +import { FaCheckCircle } from "react-icons/fa"; const ModalOverlay = ({ onClick }: { onClick: (e: React.MouseEvent) => void }) => (
@@ -56,7 +57,7 @@ const ModalHeader = () => { }; const ResumeDownloadButton = ({ resumeId, resumeName }: ResumeDownloadProps) => { - const { downloadResume } = useResumeDownLoad(); + const { downloadResume, downloading } = useResumeDownLoad(); const handleResumeDownload = () => { downloadResume({ resumeId, resumeName }); @@ -66,7 +67,7 @@ const ResumeDownloadButton = ({ resumeId, resumeName }: ResumeDownloadProps) =>
이력서 다운로드
); diff --git a/src/hooks/useResumeDownLoad.tsx b/src/hooks/useResumeDownLoad.tsx index ad5bbec1..68b98ae7 100644 --- a/src/hooks/useResumeDownLoad.tsx +++ b/src/hooks/useResumeDownLoad.tsx @@ -1,4 +1,6 @@ +"use client"; import axios from "axios"; +import { useState } from "react"; import toast from "react-hot-toast"; interface UseResumeDownloadProps { @@ -7,8 +9,10 @@ interface UseResumeDownloadProps { } export const useResumeDownLoad = () => { + const [downloading, setDownloading] = useState(false); const downloadResume = async ({ resumeId, resumeName }: UseResumeDownloadProps) => { try { + setDownloading(true); // API를 통해 이력서 파일을 다운로드 const response = await axios.get(`/api/resume/${resumeId}/download`, { responseType: "blob", @@ -36,5 +40,5 @@ export const useResumeDownLoad = () => { } }; - return { downloadResume }; + return { downloadResume, downloading }; };