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,3 @@
export default function Page() {
return <h1>Facebook view</h1>;
}

View file

@ -0,0 +1,3 @@
export default function Page() {
return <h1>Facebook view</h1>;
}

View file

@ -0,0 +1,47 @@
"use client";
import { FC } from "react";
import { GridColDef } from "@mui/x-data-grid-pro";
import { List } from "@/app/_components/List";
type FacebookBotsListProps = {
rows: any[];
};
export const FacebookBotsList: FC<FacebookBotsListProps> = ({ rows }) => {
const columns: GridColDef[] = [
{
field: "id",
headerName: "ID",
flex: 1,
},
{
field: "phoneNumber",
headerName: "Phone Number",
flex: 2,
},
{
field: "createdAt",
headerName: "Created At",
valueGetter: (params: any) =>
new Date(params.row?.createdAt).toLocaleString(),
flex: 1,
},
{
field: "updatedAt",
headerName: "Updated At",
valueGetter: (params: any) =>
new Date(params.row?.updatedAt).toLocaleString(),
flex: 1,
},
];
return (
<List
title="Facebook Bots"
entity="facebook"
rows={rows}
columns={columns}
/>
);
};

View file

@ -0,0 +1,3 @@
export default function Page() {
return <h1>Facebook Home</h1>;
}

View file

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