diff --git a/src/components/OrderHistoryDetail/OrderDetailCreater.tsx b/src/components/OrderHistoryDetail/OrderDetailCreater.tsx index 89b5923..529c242 100644 --- a/src/components/OrderHistoryDetail/OrderDetailCreater.tsx +++ b/src/components/OrderHistoryDetail/OrderDetailCreater.tsx @@ -186,7 +186,10 @@ const OrderDetailCreater = ({ spotId }: OrderDetailCreaterProps) => { //@ts-ignore modify={modifyData} onRequestClose={() => setRecruitIsOpen(false)} - onRequestConfirm={() => setCompleteModalIsOpen(true)} + onRequestConfirm={() => { + setRecruitIsOpen(false); + setCompleteModalIsOpen(true); + }} //TODO임시 onRequestError={() => {}} /> diff --git a/src/components/OrderHistoryDetail/OrderDetailMember.tsx b/src/components/OrderHistoryDetail/OrderDetailMember.tsx index 834e301..1348c9f 100644 --- a/src/components/OrderHistoryDetail/OrderDetailMember.tsx +++ b/src/components/OrderHistoryDetail/OrderDetailMember.tsx @@ -19,9 +19,9 @@ const OrderDetailMember = () => { const [price, setPrice] = useState(0); const navigate = useNavigate(); const deleteSpot = () => { - fetchAuthInstance.delete(`/orders/${orderId}`).then((response) => { + fetchAuthInstance.delete(`/orders/delete/${orderId}`).then((response) => { if (response.status === 200) { - window.history.back(); + navigate(RouterPath.myPageOrderHistory); } }); }; diff --git a/src/pages/PaymentPage/index.tsx b/src/pages/PaymentPage/index.tsx index e72f775..7e90351 100644 --- a/src/pages/PaymentPage/index.tsx +++ b/src/pages/PaymentPage/index.tsx @@ -6,19 +6,19 @@ import InputField from '@components/common/InputField'; import { Common } from '@styles/globalStyle'; import { fetchInstance } from '@api/instance/index'; import Cookies from 'js-cookie'; -import { useLocation } from 'react-router-dom'; -import { usePostIsPayed } from '@api/hooks/usePostIspayed'; +import { useLocation, useNavigate } from 'react-router-dom'; import { usePostPayPrice } from '@api/hooks/usePostpayPrice'; +import { RouterPath } from '@routes/path'; const PaymentPage: React.FC = () => { const location = useLocation(); - const { mutate: postIsPayed } = usePostIsPayed(); const { mutate: postPayPrice } = usePostPayPrice(); const [paymentAmount, setPaymentAmount] = useState( location.state.price || 0, ); const [loading, setLoading] = useState(false); const [refreshKey, setRefreshKey] = useState(0); + const navigate = useNavigate(); const handlePaymentChange = (e: React.ChangeEvent) => { const { value } = e.target; @@ -55,12 +55,12 @@ const PaymentPage: React.FC = () => { ) .then(async () => { alert('결제가 완료되었습니다.'); - postIsPayed({ orderId: location.state.orderId }); - await postPayPrice({ + postPayPrice({ orderId: location.state.orderId, price: location.state.price, }); setPaymentAmount(0); + navigate(RouterPath.myPageOrderHistory); setRefreshKey((prev) => prev + 1); }) .catch((error) => { diff --git a/src/pages/SignupPage/index.tsx b/src/pages/SignupPage/index.tsx index 2000358..0a9199e 100644 --- a/src/pages/SignupPage/index.tsx +++ b/src/pages/SignupPage/index.tsx @@ -119,7 +119,7 @@ const SignupPage: React.FC = () => { setIsOpen(false)} - title="[여기먹때] 마케팅 정보 수신 동의" + title="[요기먹때] 마케팅 정보 수신 동의" content={