'use client'; import React, { useState } from 'react'; import UserForm from '../components/UserForm'; import DeleteButton from '../components/DeleteButton'; import { deleteAdmin } from '../actions'; interface UserManagerProps { users: any[]; } export default function UserManager({ users }: UserManagerProps) { const [showForm, setShowForm] = useState(false); const [editingUser, setEditingUser] = useState(null); const handleEdit = (user: any) => { setEditingUser(user); setShowForm(true); }; const handleClose = () => { setShowForm(false); setEditingUser(null); }; return (

Kullanıcılar

Yönetici hesaplarını yönetin

{users.map((user) => ( ))}
Kullanıcı Adı Oluşturulma İşlemler
{user.username} {new Date(user.createdAt).toLocaleDateString('tr-TR')} {users.length > 1 && ( { await deleteAdmin(user.id); }} /> )}
{showForm && ( )}
); }