fix: slide bar not trigger active

This commit is contained in:
QiShaoXuan
2022-12-26 14:50:02 +08:00
parent 3ef167ddbf
commit f20b9d5728
@@ -122,11 +122,11 @@ export const WorkSpaceSliderBar = () => {
<SearchIcon /> Quick search <SearchIcon /> Quick search
</StyledListItem> </StyledListItem>
<Link href={{ pathname: paths.all }}> <Link href={{ pathname: paths.all }}>
<StyledListItem active={router.pathname === paths.all}> <StyledListItem active={router.asPath === paths.all}>
<AllPagesIcon /> <span>All pages</span> <AllPagesIcon /> <span>All pages</span>
</StyledListItem> </StyledListItem>
</Link> </Link>
<StyledListItem active={router.pathname === paths.favorite}> <StyledListItem active={router.asPath === paths.favorite}>
<StyledLink href={{ pathname: paths.favorite }}> <StyledLink href={{ pathname: paths.favorite }}>
<FavouritesIcon /> <FavouritesIcon />
Favourites Favourites
@@ -158,7 +158,7 @@ export const WorkSpaceSliderBar = () => {
</Tooltip> </Tooltip>
<Link href={{ pathname: paths.trash }}> <Link href={{ pathname: paths.trash }}>
<StyledListItem active={router.pathname === paths.trash}> <StyledListItem active={router.asPath === paths.trash}>
<TrashIcon /> Trash <TrashIcon /> Trash
</StyledListItem> </StyledListItem>
</Link> </Link>