Skip to content

Commit

Permalink
feat: onClickhandler 타입 추가 + 장바구니 링크 연결 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenS3same committed Dec 9, 2024
1 parent 56e57d3 commit d99d278
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Header = () => {
{isLoggedIn && (
<StyledLink
to={isAdmin ? '#' : '/mypage/setting'}
onClick={(e) => {
onClick={(e: React.MouseEvent<HTMLAnchorElement>) => {
if (isAdmin) {
e.preventDefault(); // Admin일 경우 링크 동작 차단
} else {
Expand Down Expand Up @@ -92,7 +92,10 @@ const Header = () => {
</LogOut>
<LogOut>
<CartIcon>
<StyledLink to="/cart" onClick={toggleMobileMenu}>
<StyledLink
to="/mypage/wishlist"
onClick={toggleMobileMenu}
>
<img src={cart} alt="장바구니 아이콘" />
</StyledLink>
</CartIcon>
Expand Down

0 comments on commit d99d278

Please sign in to comment.