Skip to content

Commit

Permalink
Fix: fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
abanicaisse committed Jul 31, 2024
1 parent ec05cad commit f00c10a
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import clsx from "clsx";
import { EllipsisVertical } from "lucide-react";
import { useRouter } from "next/navigation";
import { useState } from "react";

import { Button } from "~/components/ui/button";
Expand All @@ -18,7 +17,6 @@ import { Product } from "../../data/mock.products";
import DeleteDialog from "../ProductModal/delete-dialog";

const ProductRow = ({ product }: { product: Product }) => {
const router = useRouter();
const [isDialogOpen, setIsDialogOpen] = useState(false);
const handleOpenDialog = () => setIsDialogOpen(true);
const handleCloseDialog = () => setIsDialogOpen(false);
Expand Down Expand Up @@ -60,13 +58,7 @@ const ProductRow = ({ product }: { product: Product }) => {
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuLabel className="sr-only">Actions</DropdownMenuLabel>
<DropdownMenuItem
onClick={() => {
router.push(`./products/edit/${product.id}`);
}}
>
Edit
</DropdownMenuItem>
<DropdownMenuItem>Edit</DropdownMenuItem>
<DropdownMenuItem onClick={handleOpenDialog}>
Delete
</DropdownMenuItem>
Expand Down

0 comments on commit f00c10a

Please sign in to comment.