mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
ref: remove classname from navbar link
This commit is contained in:
@@ -67,7 +67,6 @@ export const Navbar = async ({ links, menuItemGroups }: NavbarProps) => {
|
||||
key={link.name}
|
||||
name={link.name}
|
||||
href={link.href}
|
||||
className="font-poppins text-[20px] leading-[28px]"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -12,22 +12,20 @@ import { usePathname } from "next/navigation";
|
||||
interface NavbarLinkProps {
|
||||
name: string;
|
||||
href: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const NavbarLink = ({ name, href, className }: NavbarLinkProps) => {
|
||||
export const NavbarLink = ({ name, href }: NavbarLinkProps) => {
|
||||
const pathname = usePathname();
|
||||
const parts = pathname.split("/");
|
||||
const activeLink = "/" + (parts.length > 2 ? parts[2] : parts[1]);
|
||||
|
||||
return (
|
||||
<Link href={href} data-testid={`navbar-link-${name.toLowerCase()}`}>
|
||||
<Link href={href} data-testid={`navbar-link-${name.toLowerCase()}`} className="font-poppins text-[20px] leading-[28px]">
|
||||
<div
|
||||
className={`h-[48px] px-5 py-4 ${className} ${
|
||||
activeLink === href
|
||||
? "rounded-2xl bg-neutral-800 dark:bg-neutral-200"
|
||||
: ""
|
||||
} flex items-center justify-start gap-3`}
|
||||
className={`h-[48px] px-5 py-4 ${activeLink === href
|
||||
? "rounded-2xl bg-neutral-800 dark:bg-neutral-200"
|
||||
: ""
|
||||
} flex items-center justify-start gap-3`}
|
||||
>
|
||||
{href === "/marketplace" && (
|
||||
<IconShoppingCart
|
||||
@@ -50,11 +48,10 @@ export const NavbarLink = ({ name, href, className }: NavbarLinkProps) => {
|
||||
/>
|
||||
)}
|
||||
<div
|
||||
className={`font-poppins text-[20px] font-medium leading-[28px] ${
|
||||
activeLink === href
|
||||
? "text-neutral-50 dark:text-neutral-900"
|
||||
: "text-neutral-900 dark:text-neutral-50"
|
||||
}`}
|
||||
className={`font-poppins text-[20px] font-medium leading-[28px] ${activeLink === href
|
||||
? "text-neutral-50 dark:text-neutral-900"
|
||||
: "text-neutral-900 dark:text-neutral-50"
|
||||
}`}
|
||||
>
|
||||
{name}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user