add inspect button
This commit is contained in:
parent
6dc05d2610
commit
ec96a1e988
|
@ -4,8 +4,9 @@ import { StoryWithGenres } from "./page"
|
||||||
import { ArrowUpDown, MoreHorizontal } from "lucide-react"
|
import { ArrowUpDown, MoreHorizontal } from "lucide-react"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { Badge } from "@/components/ui/badge"
|
import { Badge } from "@/components/ui/badge"
|
||||||
import { Trash2 } from "lucide-react"
|
import { Trash2, Search } from "lucide-react"
|
||||||
import { deleteStory } from "app/lib/del"
|
import { deleteStory } from "app/lib/del"
|
||||||
|
import Link from "next/link"
|
||||||
|
|
||||||
|
|
||||||
const columnHelper = createColumnHelper<StoryWithGenres>()
|
const columnHelper = createColumnHelper<StoryWithGenres>()
|
||||||
|
@ -51,11 +52,14 @@ export const columns: ColumnDef<StoryWithGenres>[] = [
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
id: "actions",
|
id: "actions",
|
||||||
header: "Actions",
|
// header: "Actions",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
return <Button variant="ghost"
|
return <div className="flex items-center justify-around">
|
||||||
|
<Link href={`/story/${row.original.id}`}><Search /></Link>
|
||||||
|
<Button variant="ghost"
|
||||||
onClick={() => { deleteStory(row.original.id) }}>
|
onClick={() => { deleteStory(row.original.id) }}>
|
||||||
<Trash2 color="red" /></Button>
|
<Trash2 color="red" /></Button>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -883,6 +883,10 @@ body {
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content-center {
|
||||||
|
align-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
.items-start {
|
.items-start {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
@ -903,6 +907,10 @@ body {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.justify-around {
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
.gap-1 {
|
.gap-1 {
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue