nice clean
This commit is contained in:
parent
a6a343ba25
commit
29eacb2578
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user