Skip to content

Commit

Permalink
fix: 배포시 발생하는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
pepperdad committed Jul 15, 2024
1 parent f478ccb commit 36c8154
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
33 changes: 15 additions & 18 deletions src/pages/lookup/Lookup.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
import * as S from "./Lookup.styled";
import NonExistent from "./components/nonExistent/NonExistent";
import LookupWrapper from "./components/LookupWrapper";
import NonExistent from "./components/nonExistent/NonExistent";
import * as S from "./Lookup.styled";

import { dummyData } from "./dummyData";

import { LookupProps } from "./types/lookupType";

import ActionBottomSheet from "@components/commons/bottomSheet/actionsBottomSheet/ActionBottomSheet";
import PhoneNumber from "@components/commons/bottomSheet/actionsBottomSheet/phoneNumber/PhoneNumber";
import OuterLayout from "@components/commons/bottomSheet/OuterLayout";
Expand Down Expand Up @@ -56,20 +54,19 @@ const Lookup = () => {
{lookUpList.map((item) => (
<React.Fragment key={item.bookingId}>
<LookupWrapper {...item} handleBtn={() => handleSheetOpen(item.bookingId)} />
{selectedBookingId === item.bookingId && (
<ActionBottomSheet
onClickOutside={handleSheetClose}
title="대표자에게 연락하여 취소를 요청해 주세요"
subTitle="대표자 연락처"
alignItems="center"
padding="2rem 2rem 2.4rem 2rem"
>
<PhoneNumber phone={item.bookerPhoneNumber} />
<OuterLayout margin="1.6rem 0 0 0">
<Button onClick={handleSheetClose}>확인했어요</Button>
</OuterLayout>
</ActionBottomSheet>
)}
<ActionBottomSheet
isOpen={selectedBookingId === item.bookingId}
onClickOutside={handleSheetClose}
title="대표자에게 연락하여 취소를 요청해 주세요"
subTitle="대표자 연락처"
alignItems="center"
padding="2rem 2rem 2.4rem 2rem"
>
<PhoneNumber phone={item.bookerPhoneNumber} />
<OuterLayout margin="1.6rem 0 0 0">
<Button onClick={handleSheetClose}>확인했어요</Button>
</OuterLayout>
</ActionBottomSheet>
</React.Fragment>
))}
</>
Expand Down
14 changes: 10 additions & 4 deletions src/pages/nonMbLookup/components/InputWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const InputWrapper = ({ btnOn, btnOff, isReadyRequest, dataStatus }: InputProps)
pwdStatus: false,
});

const { name, birth, number, password, pwdStatus } = nonMemberInfo;
const { bookerName, birth, number, password, pwdStatus } = nonMemberInfo;

const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const { name: fieldName, value } = e.target;
Expand Down Expand Up @@ -56,12 +56,12 @@ const InputWrapper = ({ btnOn, btnOff, isReadyRequest, dataStatus }: InputProps)
};

useEffect(() => {
if (name && birth.length === 6 && number.length === 13 && password.length === 4) {
if (bookerName && birth.length === 6 && number.length === 13 && password.length === 4) {
btnOn();
} else {
btnOff();
}
}, [name, birth, number, password]);
}, [bookerName, birth, number, password]);

useEffect(() => {
if (isReadyRequest) {
Expand All @@ -86,7 +86,13 @@ const InputWrapper = ({ btnOn, btnOff, isReadyRequest, dataStatus }: InputProps)
return (
<S.InputWrapperLayout>
{/* maxLenght 있는 부분 InputField에서 글자수 보이게 / 안 보이게 조정 필요 */}
<TextField name="name" type="input" value={name} onChange={handleChange} placeholder="이름" />
<TextField
name="name"
type="input"
value={bookerName}
onChange={handleChange}
placeholder="이름"
/>
<TextField
type="input"
name="birth"
Expand Down

0 comments on commit 36c8154

Please sign in to comment.