Update Bridge file layout

This commit is contained in:
Darren Clarke 2024-04-23 13:36:51 +02:00
parent 2c43e81436
commit b0fb643b6a
47 changed files with 2488 additions and 2087 deletions

View file

@ -0,0 +1,31 @@
"use client";
import { FC } from "react";
import { GridColDef } from "@mui/x-data-grid-pro";
import { List } from "@/app/_components/List";
type UsersListProps = {
rows: any[];
};
export const UsersList: FC<UsersListProps> = ({ rows }) => {
const columns: GridColDef[] = [
{
field: "name",
headerName: "Name",
flex: 2,
},
{
field: "email",
headerName: "Email",
flex: 2,
},
{
field: "emailVerified",
headerName: "Verified",
flex: 1,
},
];
return <List title="Users" entity="users" rows={rows} columns={columns} />;
};

View file

@ -0,0 +1,11 @@
import { UsersList } from "./_components/UsersList";
import { db } from "@/app/_lib/database";
export const dynamic = "force-dynamic";
export default async function Page() {
const rows = await db.selectFrom("User").selectAll().execute();
console.log(rows);
return <UsersList rows={rows} />;
}