Skip to content

Commit

Permalink
refactor: HeaderProfile 컴포넌트 url 및 alt 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ccwnc committed Apr 15, 2024
1 parent 22f212c commit 03ae082
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/header/HeaderProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,15 @@ type HeaderProfileProps = {
};

const HeaderProfile = ({ nickname, profileImageUrl, isActivated, onClick, headerProfileRef }: HeaderProfileProps) => {
const { url, alt } = isActivated ? top : bottom;

return (
<div>
<button className={cx('header-profile')} onClick={onClick} ref={headerProfileRef}>
<Avatar size='small' isActivated={isActivated} profileImageUrl={profileImageUrl} />
<div className={cx('header-profile-container-inner')}>
<span className={cx('lg-only')}>{nickname}</span>
<img
className={cx('sm-hidden')}
src={isActivated ? top.url : bottom.url}
alt={isActivated ? top.alt : bottom.alt}
width={16}
height={16}
/>
<img className={cx('sm-hidden')} src={url} alt={alt} width={16} height={16} />
</div>
</button>
</div>
Expand Down

0 comments on commit 03ae082

Please sign in to comment.