add edit button
This commit is contained in:
parent
878daf35bb
commit
b5745a3c05
|
@ -1,6 +1,6 @@
|
|||
import { Dialog, DialogTrigger, DialogClose, DialogDescription, DialogContent, DialogTitle, DialogHeader, DialogFooter } from "@/components/ui/dialog"
|
||||
import Link from "next/link"
|
||||
import { Trash2, Search } from "lucide-react"
|
||||
import { Trash2, Search, Pencil } from "lucide-react"
|
||||
import { Button } from "@/components/ui/button"
|
||||
|
||||
export function actions({ pathname, deleteFn }: { pathname: string, deleteFn: (id: number) => void }) {
|
||||
|
@ -13,6 +13,9 @@ export function actions({ pathname, deleteFn }: { pathname: string, deleteFn: (i
|
|||
<Link href={`${pathname}/${row.original.id}`}><Button variant="ghost"><Search /></Button></Link>
|
||||
: ""
|
||||
}
|
||||
|
||||
<Link href={`${pathname}/edit/${row.original.id}`}><Button variant="ghost"><Pencil /></Button></Link>
|
||||
|
||||
<Dialog>
|
||||
<DialogTrigger asChild>
|
||||
<Button variant="ghost"><Trash2 color="red" /></Button>
|
||||
|
|
Loading…
Reference in New Issue