Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
feat(TestCaseCrudModal) : icon change
Browse files Browse the repository at this point in the history
  • Loading branch information
kasterra committed May 28, 2024
1 parent 803119d commit 7d59bec
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 deletions.
3 changes: 3 additions & 0 deletions app/assets/minus-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/plus-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
}
}}
>
<img src={trash} alt="delete icon" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -63,7 +61,7 @@

.file-row {
display: flex;
height: 20px;
height: 30px;
width: 100%;
justify-content: space-between;
align-items: center;
Expand Down

0 comments on commit 7d59bec

Please sign in to comment.