Generalize WIP
This commit is contained in:
parent
a3e8b89128
commit
cb7a3a08dc
31 changed files with 657 additions and 106 deletions
|
|
@ -0,0 +1,25 @@
|
|||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
import { List as InternalList } from "@/app/_components/List";
|
||||
import type { Selectable } from "kysely";
|
||||
import { Database } from "@/app/_lib/database";
|
||||
import { serviceConfig } from "@/app/_lib/config";
|
||||
|
||||
type ListProps = {
|
||||
service: string;
|
||||
rows: Selectable<keyof Database>[];
|
||||
};
|
||||
|
||||
export const List: FC<ListProps> = ({ service, rows }) => {
|
||||
const { displayName, entity, listColumns } = serviceConfig[service];
|
||||
|
||||
return (
|
||||
<InternalList
|
||||
title={displayName}
|
||||
entity={entity}
|
||||
rows={rows}
|
||||
columns={listColumns}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue