Skip to content

Commit b54fc57

Browse files
committed
fix: 이메일 표시 로직 수정 및 로그인 상태에 따른 메시지 개선
1 parent c6fdb34 commit b54fc57

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/pages/MyPage/Profile/Profile.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const MyPageProfile = () => {
1111
const { isLogin, userInfo, handleNavigateLogin, setUserInfo } = useAuthInfo();
1212

1313
const username = userInfo?.nickname ?? '아직 정보가 없어요!';
14-
const useremail = userInfo?.email ?? '로그인을 진행해주세요';
14+
const rawEmail = userInfo?.email;
15+
const useremail = rawEmail && !rawEmail.endsWith('@apple.local') ? rawEmail : null;
1516

1617
const handleClickProfile = () => {
1718
if (!isLogin) {
@@ -62,8 +63,11 @@ const MyPageProfile = () => {
6263
handleClickCircle={handleClickProfileImage}
6364
/>
6465
<ProfileContents>
65-
<p>{username}<RightArrowThickSVG /></p>
66-
<span>{useremail}</span>
66+
<p>
67+
{username}
68+
<RightArrowThickSVG />
69+
</p>
70+
{(!isLogin || useremail) && <span>{isLogin ? useremail : '로그인을 진행해주세요'}</span>}
6771
</ProfileContents>
6872
</ProfileContainer>
6973
);

0 commit comments

Comments
 (0)