From eb5b5de72485c53137ed33c1f07263087901e918 Mon Sep 17 00:00:00 2001 From: gjaegyun Date: Mon, 20 May 2024 20:33:59 +0900 Subject: [PATCH 1/2] Fix build error --- src/components/CardModal/BusinessCardModal/index.tsx | 10 +++++----- src/pageContainers/SelectPage/index.tsx | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/CardModal/BusinessCardModal/index.tsx b/src/components/CardModal/BusinessCardModal/index.tsx index fbea090..ea549b2 100644 --- a/src/components/CardModal/BusinessCardModal/index.tsx +++ b/src/components/CardModal/BusinessCardModal/index.tsx @@ -24,12 +24,12 @@ const CardModal: React.FC = ({ const [isPrinting, setIsPrinting] = useState(false); const commonProps = { - name: userInfo?.name, - major: userInfo?.major, + name: userInfo?.name || '', + major: userInfo?.major || '', phoneNumber: userInfo ? formatPhoneNumber(userInfo.phoneNumber) : '', - email: userInfo?.email, - mbti: isValidMBTI(userInfo?.mbti) ? userInfo.mbti : undefined, - instagram: userInfo.instagram, + email: userInfo?.email || '', + mbti: userInfo && isValidMBTI(userInfo.mbti) ? userInfo.mbti : undefined, + instagram: userInfo?.instagram || '', imageUrl: imageUrl, }; diff --git a/src/pageContainers/SelectPage/index.tsx b/src/pageContainers/SelectPage/index.tsx index f436515..51ed841 100644 --- a/src/pageContainers/SelectPage/index.tsx +++ b/src/pageContainers/SelectPage/index.tsx @@ -32,12 +32,12 @@ const SelectPage: React.FC = ({ }; const commonProps = { - name: userInfo.name, - major: userInfo.major, - phoneNumber: formatPhoneNumber(userInfo.phoneNumber), - email: userInfo.email, - mbti: isValidMBTI(userInfo?.mbti) ? userInfo.mbti : undefined, - instagram: userInfo.instagram, + name: userInfo?.name || '', + major: userInfo?.major || '', + phoneNumber: userInfo ? formatPhoneNumber(userInfo.phoneNumber) : '', + email: userInfo?.email || '', + mbti: userInfo && isValidMBTI(userInfo.mbti) ? userInfo.mbti : undefined, + instagram: userInfo?.instagram || '', imageUrl: selectedButton === SelectedType.YES ? convertedImageUrl! : imageUrl, }; From e28ee59ff63a61839a268fdaea65c8ab91948b3c Mon Sep 17 00:00:00 2001 From: gjaegyun Date: Mon, 20 May 2024 20:54:18 +0900 Subject: [PATCH 2/2] Fix build error --- src/components/CardModal/BusinessCardModal/index.tsx | 6 +++--- src/pageContainers/SelectPage/index.tsx | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/CardModal/BusinessCardModal/index.tsx b/src/components/CardModal/BusinessCardModal/index.tsx index ea549b2..d664e72 100644 --- a/src/components/CardModal/BusinessCardModal/index.tsx +++ b/src/components/CardModal/BusinessCardModal/index.tsx @@ -24,10 +24,10 @@ const CardModal: React.FC = ({ const [isPrinting, setIsPrinting] = useState(false); const commonProps = { - name: userInfo?.name || '', + name: userInfo!.name, major: userInfo?.major || '', - phoneNumber: userInfo ? formatPhoneNumber(userInfo.phoneNumber) : '', - email: userInfo?.email || '', + phoneNumber: formatPhoneNumber(userInfo!.phoneNumber), + email: userInfo!.email, mbti: userInfo && isValidMBTI(userInfo.mbti) ? userInfo.mbti : undefined, instagram: userInfo?.instagram || '', imageUrl: imageUrl, diff --git a/src/pageContainers/SelectPage/index.tsx b/src/pageContainers/SelectPage/index.tsx index 51ed841..b6f74b1 100644 --- a/src/pageContainers/SelectPage/index.tsx +++ b/src/pageContainers/SelectPage/index.tsx @@ -32,14 +32,13 @@ const SelectPage: React.FC = ({ }; const commonProps = { - name: userInfo?.name || '', + name: userInfo!.name, major: userInfo?.major || '', - phoneNumber: userInfo ? formatPhoneNumber(userInfo.phoneNumber) : '', - email: userInfo?.email || '', + phoneNumber: formatPhoneNumber(userInfo!.phoneNumber), + email: userInfo!.email, mbti: userInfo && isValidMBTI(userInfo.mbti) ? userInfo.mbti : undefined, instagram: userInfo?.instagram || '', - imageUrl: - selectedButton === SelectedType.YES ? convertedImageUrl! : imageUrl, + imageUrl: imageUrl, }; return (