diff --git a/.github/workflows/gitAction.yml b/.github/workflows/gitAction.yml index ff51ca6..61f939b 100644 --- a/.github/workflows/gitAction.yml +++ b/.github/workflows/gitAction.yml @@ -21,5 +21,3 @@ jobs: environment: prod access_key: ${{ secrets.XQUAER_ACCESS_KEY }} github_token: ${{ secrets.PICK_WEB_TEACHER }} - buildargs: | - BASE_URL=${{ secrets.BASE_URL }} diff --git a/.github/workflows/stagGitAction.yml b/.github/workflows/stagGitAction.yml index 723b832..2fec6dc 100644 --- a/.github/workflows/stagGitAction.yml +++ b/.github/workflows/stagGitAction.yml @@ -21,5 +21,3 @@ jobs: environment: stag access_key: ${{ secrets.XQUAER_ACCESS_KEY }} github_token: ${{ secrets.PICK_WEB_TEACHER }} - buildargs: | - BASE_URL=${{ secrets.STAG_BASE_URL }} diff --git a/Dockerfile b/Dockerfile index cae1621..e11d8c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,6 @@ COPY . . RUN yarn build -ARG BASE_URL -ENV NEXT_PUBLIC_API_KEY $BASE_URL - EXPOSE 3000 CMD ["yarn", "dev"] diff --git a/src/api/bug/index.ts b/src/api/bug/index.ts index 72758cf..46085b8 100644 --- a/src/api/bug/index.ts +++ b/src/api/bug/index.ts @@ -27,7 +27,6 @@ export const BugPost = () => { }; export const BugImg = () => { - const { handleError } = apiError(); return useMutation({ mutationFn: async (param) => { try { diff --git a/src/app/BugReport/page.tsx b/src/app/BugReport/page.tsx index 7a3f459..b7cd63d 100644 --- a/src/app/BugReport/page.tsx +++ b/src/app/BugReport/page.tsx @@ -63,6 +63,13 @@ const BugReport = () => { }); }; + const handleRemoveImage = (index: number) => { + setData((prevData) => ({ + ...prevData, + file_name: prevData.file_name.filter((_, i) => i !== index), + })); + }; + return ( <>
@@ -92,26 +99,65 @@ const BugReport = () => {
- <> -

버그 사진을 첨부해주세요

- -
{ - setModal(!modal); - }} - /> - + {data.file_name.length === 0 ? ( + <> +

버그 사진을 첨부해주세요

+ +
{ + setModal(!modal); + }} + /> + + ) : ( +
+ {data.file_name.map((item, index) => ( +
+ + +
+ ))} + +
{ + setModal(!modal); + }} + /> +
+ )}
= ({ isOpen, onClose, onClick }) => { const onCancle = () => { onClose(); - setImages([]); }; const AddImg = () => { onClick(images); - setImages([]); onClose(); }; @@ -106,14 +104,12 @@ const ImgModal: React.FC = ({ isOpen, onClose, onClick }) => {
-
- 이미지를 붙여넣기 해주세요. -
+ placeholder="이미지를 붙여넣기 해주세요." + />
{images.map((image, index) => (