Skip to content

Commit

Permalink
Feat: a 태그 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
cjy3458 committed Jan 18, 2024
1 parent 71f40f6 commit c7a29ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/common/header/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const NavBar = () => {
<ButtonWrapper>
<HoverButton hover={hover} dropdown={dropdown} />
{menuDataSelector().map(({ title, routing, target }, index) => (
<NavButton key={index + routing} title={title} routing={routing} target={target} />
<NavButton key={index + routing} title={title} routing={routing} />
))}
</ButtonWrapper>
</Wrapper>
Expand Down
10 changes: 3 additions & 7 deletions src/components/common/header/NavButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,16 @@ interface INavBarButton {
target?: string;
}

const NavButton = ({ title, routing, target }: INavBarButton) => {
const NavButton = ({ title, routing }: INavBarButton) => {
if (title === 'Log in' || title === 'MY')
return (
<Link href={routing}>
<LoginButton>{title}</LoginButton>
</Link>
);

return target ? (
<a href={routing}>
<Button>{title}</Button>
</a>
) : (
<Link href={routing} target={target}>
return (
<Link href={routing}>
<Button>{title}</Button>
</Link>
);
Expand Down

0 comments on commit c7a29ca

Please sign in to comment.