Refactoring
This commit is contained in:
parent
39cfada3e8
commit
dd14dfe72e
41 changed files with 866 additions and 742 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { List } from "./_components/List";
|
||||
import { db } from "@/app/_lib/database";
|
||||
import { serviceConfig } from "@/app/_lib/config";
|
||||
import { serviceConfig } from "@/app/_config/config";
|
||||
|
||||
type PageProps = {
|
||||
params: {
|
||||
|
|
@ -11,7 +11,12 @@ type PageProps = {
|
|||
export default async function Page({ params: { segment } }: PageProps) {
|
||||
const service = segment[0];
|
||||
|
||||
if (!service) return null;
|
||||
|
||||
const config = serviceConfig[service];
|
||||
|
||||
if (!config) return null;
|
||||
|
||||
const rows = await db.selectFrom(config.table).selectAll().execute();
|
||||
|
||||
return <List service={service} rows={rows} />;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue