mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-03 08:36:39 +08:00
23 lines
488 B
TypeScript
23 lines
488 B
TypeScript
import { Flex } from "antd";
|
|
import prisma from "@/lib/prisma";
|
|
import { User } from "@prisma/client";
|
|
import UsersTable from "../../components/users-table";
|
|
|
|
async function getData() {
|
|
const users = await prisma.user.findMany();
|
|
return users;
|
|
}
|
|
export default async function UsersPage() {
|
|
const users: User[] = await getData();
|
|
|
|
// console.log("data", data);
|
|
|
|
return (
|
|
<>
|
|
<Flex gap="middle" vertical>
|
|
<UsersTable users={users} />
|
|
</Flex>
|
|
</>
|
|
);
|
|
}
|