Skip to content

Commit

Permalink
Hotfix: 백엔드 응답이 보이지 않은 이슈로 인하여 임시적으로 response status에 대한 처리 없이 공개상담 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
rmdnps10 committed Apr 20, 2024
1 parent d3df242 commit d68b37c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/components/Buyer/BuyerWriteOpenConsult/FianlWritePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import { useSetRecoilState } from 'recoil';
import styled from 'styled-components';
import { Green, Grey4, LightGreen, White } from 'styles/color';
import { Body1, Body3 } from 'styles/font';
import {
isBuyPopupOpenState,
isPostPopupOpenState,
isSendPopupOpenState,
} from 'utils/atom';
import { isPostPopupOpenState } from 'utils/atom';
import { convertCategoryEnum } from 'utils/convertCategoryEnum';
interface FianlWritePopupProps {
title: string;
Expand All @@ -31,12 +27,8 @@ function FinalWritePopup({ title, content, category }: FianlWritePopupProps) {
isCompleted: true,
};
try {
const res: any = await patchOpenConsult(body);
if (res?.status === 200) {
navigate('/consult/?type=open-consult');
} else {
console.log(res);
}
await patchOpenConsult(body);
navigate('/consult/?type=open-consult');
} catch (err) {
alert(err);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/Seller/SellerOpenConsult/IsSendPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function IsSendPopup({ text, setText, setIsReplying }: IsSendPopupProps) {
};
try {
const res: any = await postComment(body);
console.log(res);
if (res?.status === 200 || res.status === 201) {
setText('');
setIsSendPopupOpen(false);
Expand Down

0 comments on commit d68b37c

Please sign in to comment.