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

31 lines
785 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-8">
<div>
<h1 className="text-2xl font-extrabold text-slate-900 tracking-tight">Kullanıcı Yönetimi</h1>
<p className="text-sm text-slate-500 mt-1">Admin paneline erişebilecek yetkili kullanıcıları yönetin.</p>
</div>
<CreateUserForm />
<UserList users={users} />
</div>
)
}