add inspect button

This commit is contained in:
andrzej 2024-06-19 22:11:09 +02:00
parent 99d693df6f
commit ddaf2bf1c4
2 changed files with 17 additions and 5 deletions

View File

@ -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">
onClick={() => { deleteStory(row.original.id) }}> <Link href={`/story/${row.original.id}`}><Search /></Link>
<Trash2 color="red" /></Button> <Button variant="ghost"
onClick={() => { deleteStory(row.original.id) }}>
<Trash2 color="red" /></Button>
</div>
} }
} }

View File

@ -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;
} }