diff --git a/src/components/CardModal/BusinessCardModal/index.tsx b/src/components/CardModal/BusinessCardModal/index.tsx index fbea090..d664e72 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, - phoneNumber: userInfo ? formatPhoneNumber(userInfo.phoneNumber) : '', - email: userInfo?.email, - mbti: isValidMBTI(userInfo?.mbti) ? userInfo.mbti : undefined, - instagram: userInfo.instagram, + name: userInfo!.name, + major: userInfo?.major || '', + 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 f436515..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, - major: userInfo.major, - phoneNumber: formatPhoneNumber(userInfo.phoneNumber), - email: userInfo.email, - mbti: isValidMBTI(userInfo?.mbti) ? userInfo.mbti : undefined, - instagram: userInfo.instagram, - imageUrl: - selectedButton === SelectedType.YES ? convertedImageUrl! : imageUrl, + name: userInfo!.name, + major: userInfo?.major || '', + phoneNumber: formatPhoneNumber(userInfo!.phoneNumber), + email: userInfo!.email, + mbti: userInfo && isValidMBTI(userInfo.mbti) ? userInfo.mbti : undefined, + instagram: userInfo?.instagram || '', + imageUrl: imageUrl, }; return (