Skip to content

Commit

Permalink
Fix selected style in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Mar 4, 2024
1 parent 41b7305 commit 5415bad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/layout/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const renderPageLink = (item: PageLink) => {
}

return (
<Menu.Item className='DfMenuItem' key={item.href[1] || item.href[0]}>
<CustomLink href={item.href[0]} passHref>
<Menu.Item className='DfMenuItem' key={item.href}>
<CustomLink href={item.href} passHref>
<a {...anchorProps}>
<span className='MenuItemIcon'>{icon}</span>
<span className='MenuItemName'>{item.name}</span>
Expand All @@ -35,7 +35,7 @@ const renderPageLink = (item: PageLink) => {
}

function SideMenu({ noOffset }: { noOffset?: boolean }) {
const { asPath } = useRouter()
const { pathname } = useRouter()
const myAddress = useMyAddress()

const menuItems = buildAuthorizedMenu(myAddress)
Expand All @@ -48,7 +48,7 @@ function SideMenu({ noOffset }: { noOffset?: boolean }) {
)}
>
<Menu
selectedKeys={[asPath]}
selectedKeys={[pathname]}
mode='inline'
theme='light'
className={clsx(styles.Menu, noOffset && styles.MenuNoOffset)}
Expand Down
7 changes: 7 additions & 0 deletions src/styles/subsocial.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2400,3 +2400,10 @@ hr {
padding-left: $space_normal;
padding-right: $space_normal;
}

.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background-color: transparent !important;
}
.ant-menu-item::after {
display: none !important;
}

0 comments on commit 5415bad

Please sign in to comment.