Redesigned Search, removed Unused Admin Route

This commit is contained in:
PxlLoewe
2025-12-27 15:33:00 +01:00
parent e9a4c50a12
commit b16b719c74
16 changed files with 209 additions and 178 deletions

View File

@@ -3,7 +3,7 @@ import { DatabaseBackupIcon } from "lucide-react";
import { PaginatedTable } from "../../../_components/PaginatedTable";
import Link from "next/link";
import { ColumnDef } from "@tanstack/react-table";
import { Keyword } from "@repo/db";
import { Keyword, Prisma } from "@repo/db";
export default () => {
return (
@@ -12,7 +12,15 @@ export default () => {
stickyHeaders
initialOrderBy={[{ id: "title", desc: true }]}
prismaModel="changelog"
searchFields={["title"]}
showSearch
getFilter={(search) =>
({
OR: [
{ title: { contains: search, mode: "insensitive" } },
{ description: { contains: search, mode: "insensitive" } },
],
}) as Prisma.ChangelogWhereInput
}
columns={
[
{