Files
moy-qr/app/admin/(dashboard)/users/page.tsx
T

28 lines
618 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import prisma from '@/lib/prisma'
import CreateUserForm from './CreateUserForm'
import UserList from './UserList'
export const metadata = {
title: 'Kullanıcı Yönetimi - Admin',
}
export default async function UsersPage() {
const users = await prisma.users.findMany({
orderBy: { created_at: 'asc' },
select: {
id: true,
username: true,
role: true,
created_at: true,
}
})
return (
<div className="space-y-6">
<h1 className="text-2xl font-bold text-gray-900">Kullanıcı Yönetimi</h1>
<CreateUserForm />
<UserList users={users} />
</div>
)
}