nice clean

This commit is contained in:
Louis Mazin 2026-09-21 13:46:59 +02:00
parent a6a343ba25
commit 29eacb2578

View File

@ -20,7 +20,7 @@ import { Label } from '@/components/ui/label';
import { useAuth } from '../context/useAuth';
const AdminUsersPage = () => {
const { user: currentUser, logout } = useAuth();
const { user, logout } = useAuth();
const [users, setUsers] = useState([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState('');
@ -100,13 +100,8 @@ const AdminUsersPage = () => {
try {
await userApi.deleteUser(userId);
if (String(userId) === String(getUserId(currentUser))) {
console.log('SUPPRESSION DE MOI');
console.log('currentUser:', currentUser);
if (String(userId) === String(getUserId(user))) {
logout();
console.log('LOGOUT APPELÉ');
return;
}