fix: match on href
This commit is contained in:
@@ -19,7 +19,7 @@ export default function Link({
|
|||||||
const currentPageSlug = usePathname()
|
const currentPageSlug = usePathname()
|
||||||
let isActive = currentPageSlug === href
|
let isActive = currentPageSlug === href
|
||||||
if (partialMatch && !isActive) {
|
if (partialMatch && !isActive) {
|
||||||
isActive = currentPageSlug.startsWith(href)
|
isActive = currentPageSlug === href
|
||||||
}
|
}
|
||||||
const classNames = linkVariants({
|
const classNames = linkVariants({
|
||||||
active: isActive,
|
active: isActive,
|
||||||
|
|||||||
Reference in New Issue
Block a user