feat: add entries count to Tag template
This commit is contained in:
parent
05c06ace8a
commit
3f1dd8d992
1 changed files with 6 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ import { DataTable } from "@/components/DataTable"
|
||||||
import { ArrowUpDown } from "lucide-react"
|
import { ArrowUpDown } from "lucide-react"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { Link } from "react-router"
|
import { Link } from "react-router"
|
||||||
|
import { Badge } from "@/components/ui/badge"
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
accessorKey: "entry_title",
|
accessorKey: "entry_title",
|
||||||
|
|
@ -45,10 +45,13 @@ export default function Tag() {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
titleComponent={
|
titleComponent={
|
||||||
<>
|
<div className="flex">
|
||||||
<span className="mr-2 text-muted-foreground">Entries tagged:</span>
|
<span className="mr-2 text-muted-foreground">Entries tagged:</span>
|
||||||
<span>{tag}</span>
|
<span>{tag}</span>
|
||||||
</>
|
<Badge variant="secondary" className="ml-3">
|
||||||
|
{data?.count || " "}
|
||||||
|
</Badge>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
pageBody={<DataTable columns={columns} data={data?.data || []} loading={isLoading} />}
|
pageBody={<DataTable columns={columns} data={data?.data || []} loading={isLoading} />}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue