Skip to content

Commit

Permalink
chore: 조건식 간소화
Browse files Browse the repository at this point in the history
  • Loading branch information
SeieunYoo committed Sep 4, 2024
1 parent 2f2237c commit 172f10c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/components/NavItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const NavItem = ({ href, imageUrl, alt, name, items }: NavItemProps) => {
const currentPath = `/${segment.join("/")}`;

const navItemType =
(currentPath === href && !segment[1] && `${segment[0]}` === href) ||
(currentPath === href && `/${segment[0]}` === href)
currentPath === href &&
((!segment[1] && `${segment[0]}` === href) || `/${segment[0]}` === href)
? "active"
: "inactive";

Expand Down

0 comments on commit 172f10c

Please sign in to comment.