fix: ctrl+click/cmd+click to open a item of the menu (#29)

This commit is contained in:
Emmanuel Morales 2024-02-16 23:34:36 -06:00 committed by GitHub
parent 2cfad8bef6
commit 126d8e77fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,6 @@ import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { cn } from "@/lib/utils";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { useMediaQuery } from "usehooks-ts";
@ -25,8 +24,6 @@ export function NavbarMenu({
const pathnames = usePathname();
const pathname = `/${pathnames.split("/")[1]}`;
const router = useRouter();
const pages = [
{
name: "Workflows",
@ -59,11 +56,8 @@ export function NavbarMenu({
<TabsTrigger
key={page.name}
value={page.path}
onClick={() => {
router.push(page.path);
}}
>
{page.name}
<Link href={page.path}>{page.name}</Link>
</TabsTrigger>
))}
</TabsList>