feat: Add tab navigation to hotel page
This commit is contained in:
@@ -10,6 +10,7 @@ import { linkVariants } from "./variants"
|
||||
import type { LinkProps } from "./link"
|
||||
|
||||
export default function Link({
|
||||
active,
|
||||
className,
|
||||
color,
|
||||
href,
|
||||
@@ -23,10 +24,12 @@ export default function Link({
|
||||
...props
|
||||
}: LinkProps) {
|
||||
const currentPageSlug = usePathname()
|
||||
let isActive = currentPageSlug === href
|
||||
let isActive = active || currentPageSlug === href
|
||||
|
||||
if (partialMatch && !isActive) {
|
||||
isActive = currentPageSlug === href
|
||||
}
|
||||
|
||||
const classNames = linkVariants({
|
||||
active: isActive,
|
||||
className,
|
||||
|
||||
Reference in New Issue
Block a user