Files

55 lines
1.3 KiB
TypeScript

import styles from "./Page.module.css";
import MachineTableActive from "./MachineTableActive";
import DSC from "./DSC";
import ToggleTable from "@/app/Components/Global/Toggle/ToggleTable";
import TableTable from "./TableTable";
import { Metadata } from "next";
import RefreshButton from "./RefreshButton";
export const metadata: Metadata = {
title: "Monitor",
};
export default async function Page(props: {
searchParams?: Promise<{ numAcount: string; key: string }>;
}) {
const params = await props.searchParams;
const numAcount = params?.numAcount ?? null;
const key = params?.key ?? "Equipos";
return (
<section className="containerSection">
<h2 className="title">MONITOR</h2>
<div className={styles.actions}>
<RefreshButton />
</div>
<ToggleTable
key={Date.now()}
defaultView={key}
options={[
{
key: "Equipos",
label: "Equipos",
content: (
<>
<MachineTableActive />
</>
),
},
{
key: "Mesas",
label: "Mesas",
content: (
<>
<TableTable />
</>
),
},
]}
/>
</section>
);
}