feat(WEB-170): edit profile view
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
"use client"
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
import { linkVariants } from "./variants"
|
||||
|
||||
import NextLink from "next/link"
|
||||
|
||||
import type { LinkProps } from "./link"
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
export default function Link({
|
||||
className,
|
||||
@@ -14,10 +14,7 @@ export default function Link({
|
||||
variant,
|
||||
...props
|
||||
}: LinkProps) {
|
||||
const currentPageSlug = `/${usePathname()
|
||||
.split("/")
|
||||
.filter((v) => v)
|
||||
.at(-1)}`
|
||||
const currentPageSlug = usePathname()
|
||||
const isActive = currentPageSlug === href
|
||||
const classNames = linkVariants({
|
||||
active: isActive,
|
||||
|
||||
Reference in New Issue
Block a user