From 098ae387e49731dc75fbdc2da582b9c2c5e06447 Mon Sep 17 00:00:00 2001 From: Bumang-Cyber Date: Sat, 27 Jan 2024 12:50:53 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=EA=B3=84=EC=A2=8C=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=20=EC=95=88=20=ED=95=B4=EB=8F=84=20=EC=A7=84=ED=96=89?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransferWritingPrice.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/pages/transferWritingPricePage/TransferWritingPrice.tsx b/src/pages/transferWritingPricePage/TransferWritingPrice.tsx index 3136056f..21f21ff2 100644 --- a/src/pages/transferWritingPricePage/TransferWritingPrice.tsx +++ b/src/pages/transferWritingPricePage/TransferWritingPrice.tsx @@ -64,11 +64,24 @@ const TransferWritingPrice = () => { // false : true여야 정상 작동함. const [firstlyNoAccount] = useState(userData?.accountNumber ? false : true); + useEffect(() => { + setBank(userData?.bank ?? null); + setAccountNumber(userData?.accountNumber ?? null); + }, [userData]); + useEffect(() => { setReadyToSubmit(() => { - if (firstPrice && opt1 && opt2 && opt3 && optFinal) { + if ( + firstPrice && + opt1 && + opt2 && + opt3 && + optFinal && + bank && + accountNumber + ) { // accountNumber 추가 - if (!is2ndChecked) return true; // 2차 가격 설정하기 체크 안 한 경우 + if (!is2ndChecked) return true; // 2차 가격 설정하기 체크 안 하고 계좌 등록된 경우 if (is2ndChecked && secondPrice && downTimeAfter) { return true; // 2차 가격 설정한 경우 @@ -95,6 +108,8 @@ const TransferWritingPrice = () => { secondPrice, downTimeAfter, userData, + bank, + accountNumber, ]); // 페이지 전환 시 적용할 효과 From 7bea45c2d512b705cacc7a45a907e5e9770ac087 Mon Sep 17 00:00:00 2001 From: Bumang-Cyber Date: Sat, 27 Jan 2024 13:06:45 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=EA=B3=84=EC=A2=8C=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=20=ED=94=8C=EB=A1=9C=EC=9A=B0=20=ED=83=80=EB=8B=A4?= =?UTF-8?q?=EA=B0=80=20=EB=8F=8C=EC=95=84=EC=99=80=EB=8F=84=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=EB=B0=95=EC=8A=A4=20=EC=82=B4=EC=95=84=EC=9E=88?= =?UTF-8?q?=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransferWritingPrice.tsx | 5 +++- .../agreementSection/AgreementSection.tsx | 26 +++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/pages/transferWritingPricePage/TransferWritingPrice.tsx b/src/pages/transferWritingPricePage/TransferWritingPrice.tsx index 21f21ff2..ba127eeb 100644 --- a/src/pages/transferWritingPricePage/TransferWritingPrice.tsx +++ b/src/pages/transferWritingPricePage/TransferWritingPrice.tsx @@ -298,11 +298,14 @@ const TransferWritingPrice = () => { onSetAccount={setAccountSetting} /> diff --git a/src/pages/transferWritingPricePage/agreementSection/AgreementSection.tsx b/src/pages/transferWritingPricePage/agreementSection/AgreementSection.tsx index 2bbf2346..3140d2ef 100644 --- a/src/pages/transferWritingPricePage/agreementSection/AgreementSection.tsx +++ b/src/pages/transferWritingPricePage/agreementSection/AgreementSection.tsx @@ -1,15 +1,22 @@ import * as S from "./AgreementSection.style"; import CheckBoxSection from "../checkBox/CheckBoxSection"; -import { useRef } from "react"; +import { useEffect, useRef } from "react"; interface AgreementProps { + opt1: boolean; + opt2: boolean; + opt3: boolean; + optFinal: boolean; setOpt1: React.Dispatch>; setOpt2: React.Dispatch>; setOpt3: React.Dispatch>; setOptFinal: React.Dispatch>; - optFinal: boolean; } const TermsSection = ({ + opt1, + opt2, + opt3, + optFinal, setOpt1, setOpt2, setOpt3, @@ -20,6 +27,21 @@ const TermsSection = ({ const check3Ref = useRef(null); const check4Ref = useRef(null); + useEffect(() => { + if (opt1 && check1Ref.current) { + (check1Ref.current as HTMLInputElement).checked = true; + } + if (opt2 && check2Ref.current) { + (check2Ref.current as HTMLInputElement).checked = true; + } + if (opt3 && check3Ref.current) { + (check3Ref.current as HTMLInputElement).checked = true; + } + if (optFinal && check4Ref.current) { + (check4Ref.current as HTMLInputElement).checked = true; + } + }); + return ( Date: Sat, 27 Jan 2024 13:08:11 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=EB=A9=94=EC=9D=B8=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=EB=B0=94=20=EB=AC=B8=EA=B5=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/homePage/navToSearchSection/NavToSearchSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/homePage/navToSearchSection/NavToSearchSection.tsx b/src/pages/homePage/navToSearchSection/NavToSearchSection.tsx index 22ffd18d..9ff43b95 100644 --- a/src/pages/homePage/navToSearchSection/NavToSearchSection.tsx +++ b/src/pages/homePage/navToSearchSection/NavToSearchSection.tsx @@ -7,7 +7,7 @@ const NavToSearchSection = () => { return ( navigate(PATH.SEARCH_FILTER)}> -

어떤 호텔을 찾으세요?

+

언제 어디로 떠나세요?

); From 59a465582a7ce9e9e20808a4e8b301673e3da560 Mon Sep 17 00:00:00 2001 From: Bumang-Cyber Date: Sat, 27 Jan 2024 13:50:34 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20postValidateEmail=EC=9D=84=20instan?= =?UTF-8?q?ce=EA=B0=80=20=EC=95=84=EB=8B=8C=20axios=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/fetchLogin.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/apis/fetchLogin.ts b/src/apis/fetchLogin.ts index 9a07f438..a21c60ed 100644 --- a/src/apis/fetchLogin.ts +++ b/src/apis/fetchLogin.ts @@ -2,7 +2,6 @@ import axios from "axios"; import { END_POINTS, BASE_URL } from "@/constants/api"; import type { EmailValidateData, LoginData } from "@type/login"; import type { ResponseData } from "@type/responseType"; -import { axiosInstance } from "./axiosInstance"; interface LoginProps { email: string; @@ -29,8 +28,8 @@ export const postLogin = async ({ export const postValidateEmail = async ( email: string, ): Promise => { - const { data } = await axiosInstance.post>( - END_POINTS.EMAIL, + const { data } = await axios.post>( + BASE_URL + END_POINTS.EMAIL, { email }, ); return data.data;