From bca6b814b1293ec98fd8bd04b8044eda5a28a6e6 Mon Sep 17 00:00:00 2001 From: hongggy Date: Thu, 26 Dec 2024 09:30:17 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EC=A7=80=EC=9B=90=EC=84=9C=20?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20=EC=8A=A4=ED=94=BC?= =?UTF-8?q?=EB=84=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/modal/modals/apply/MyApplicationModal.tsx | 5 +++-- src/hooks/useResumeDownLoad.tsx | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) 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 }; }; From c04e1aed2f3ec99bd3dd298b0eaf76a12e95e89b Mon Sep 17 00:00:00 2001 From: hongggy Date: Thu, 26 Dec 2024 10:20:55 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=ED=97=A4=EB=8D=94=20=EB=86=92?= =?UTF-8?q?=EC=9D=B4=EB=A7=8C=ED=81=BC=20=EB=B0=B0=EA=B2=BD=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/layout/auth/Background.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}
);