diff --git a/app/assets/minus-square.svg b/app/assets/minus-square.svg new file mode 100644 index 0000000..86b2981 --- /dev/null +++ b/app/assets/minus-square.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/assets/plus-square.svg b/app/assets/plus-square.svg new file mode 100644 index 0000000..f9555fc --- /dev/null +++ b/app/assets/plus-square.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseAddModal.tsx b/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseAddModal.tsx index d18670e..bbb409d 100644 --- a/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseAddModal.tsx +++ b/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseAddModal.tsx @@ -9,8 +9,8 @@ import { postNewTestcase } from "~/API/testCase"; import { useAuth } from "~/contexts/AuthContext"; import toast from "react-hot-toast"; import { useState } from "react"; -import plusW from "~/assets/plus-w.svg"; -import minusW from "~/assets/minus-w.svg"; +import plusW from "~/assets/plus-square.svg"; +import minusW from "~/assets/minus-square.svg"; interface Props { isOpen: boolean; diff --git a/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseEditModal.tsx b/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseEditModal.tsx index 5219624..8611efc 100644 --- a/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseEditModal.tsx +++ b/app/routes/_procted+/lectures+/$lectureId+/_layout/TestCaseEditModal.tsx @@ -15,8 +15,8 @@ import TextInput from "~/components/Input/TextInput"; import RadioGroup from "~/components/Radio/RadioGroup"; import TextArea from "~/components/Input/TextArea"; import toast from "react-hot-toast"; -import plusW from "~/assets/plus-w.svg"; -import minusW from "~/assets/minus-w.svg"; +import plusW from "~/assets/plus-square.svg"; +import minusW from "~/assets/minus-square.svg"; import trash from "~/assets/trash.svg"; import download from "~/assets/download.svg"; import pkg from "file-saver"; @@ -204,20 +204,22 @@ const TestCaseEditModal = ({ isOpen, onClose, testCaseId }: Props) => { className={styles.icon} onClick={async (e) => { e.stopPropagation(); - await toast.promise( - deleteFileInputFromTestCase( - testCaseId, - file.name, - auth.token - ), - { - loading: "TC 파일 삭제중...", - success: "TC 파일 삭제완료!", - error: (error) => - `Error: ${error.message} - ${error.responseMessage}`, - } - ); - setIsLoading(true); + if (confirm("TC 파일을 삭제하시겠습니까?")) { + await toast.promise( + deleteFileInputFromTestCase( + testCaseId, + file.name, + auth.token + ), + { + loading: "TC 파일 삭제중...", + success: "TC 파일 삭제완료!", + error: (error) => + `Error: ${error.message} - ${error.responseMessage}`, + } + ); + setIsLoading(true); + } }} > delete icon diff --git a/app/routes/_procted+/lectures+/$lectureId+/_layout/modal.module.css b/app/routes/_procted+/lectures+/$lectureId+/_layout/modal.module.css index bf69cda..6b20415 100644 --- a/app/routes/_procted+/lectures+/$lectureId+/_layout/modal.module.css +++ b/app/routes/_procted+/lectures+/$lectureId+/_layout/modal.module.css @@ -29,13 +29,11 @@ .circular-button { width: 30px; height: 30px; - border-radius: 50%; - background-color: #756f86; } .circular-button img { - width: 100%; - height: 100%; + width: 30px; + height: 30px; } .area { @@ -63,7 +61,7 @@ .file-row { display: flex; - height: 20px; + height: 30px; width: 100%; justify-content: space-between; align-items: center;