Skip to content

Commit ee093d0

Browse files
committed
reafac: 메인페이지 헤더 로그인시 ProfileCircle 컴포넌트가 보이도록 수정
1 parent 3318db5 commit ee093d0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pages/home/ui/MainPage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import LoginModal from '../../../widgets/main/ui/LoginModal';
1414
import { cardButtons } from '../../../shared/types/mainCardButtonType';
1515
import useAuthStore from '../../../app/provider/authStore';
1616
import EventTags from '../../../features/home/ui/EventTags';
17+
import ProfileCircle from '../../../../design-system/ui/Profile';
1718
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
1819

1920
const MainPage = () => {
@@ -40,12 +41,11 @@ const MainPage = () => {
4041
leftButtonClick={() => {}}
4142
leftButtonLabel="같이가요"
4243
rightContent={
43-
<SecondaryButton
44-
size="large"
45-
color="black"
46-
label={isLoggedIn ? `${name}님` : '로그인'}
47-
onClick={isLoggedIn ? closeModal : openModal}
48-
/>
44+
isLoggedIn ? (
45+
<ProfileCircle profile="userProfile" name={name?.slice(1, 3) || ''} className="w-11 h-11 text-15" />
46+
) : (
47+
<SecondaryButton size="large" color="black" label="로그인" onClick={openModal} />
48+
)
4949
}
5050
/>
5151
<AnimatePresence>{isModalOpen && <LoginModal onClose={closeModal} />}</AnimatePresence>

0 commit comments

Comments
 (0)