Skip to content

Commit

Permalink
fix(project): home button always in active state
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Sep 26, 2022
1 parent e81f491 commit 3141fe3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Button: React.FC<Props> = ({
const span = <span className={styles.buttonLabel}>{label}</span>;

return to ? (
<NavLink className={({ isActive }) => buttonClassName(isActive)} to={to} {...rest}>
<NavLink className={({ isActive }) => buttonClassName(isActive)} to={to} {...rest} end>
{icon}
{span}
{children}
Expand Down
1 change: 1 addition & 0 deletions src/components/MenuButton/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const MenuButton: React.FC<Props> = ({ label, to, onClick, tabIndex = 0, active
onClick={onClick}
to={to}
tabIndex={tabIndex}
end
>
{icon}
<span className={styles.label}>{label}</span>
Expand Down

0 comments on commit 3141fe3

Please sign in to comment.