mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 16:51:13 -05:00
Continue console cleanup
This commit is contained in:
@@ -10,7 +10,8 @@ import { Badge } from '@/components/ui/badge';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { handleError, handleSuccess } from '@/lib/errorHandler';
|
||||
import { handleError, handleSuccess, getErrorMessage } from '@/lib/errorHandler';
|
||||
import { logger } from '@/lib/logger';
|
||||
|
||||
interface UserProfile {
|
||||
id: string;
|
||||
@@ -100,7 +101,7 @@ export function ProfileManager() {
|
||||
_details: { banned: ban }
|
||||
});
|
||||
|
||||
if (logError) console.error('Error logging action:', logError);
|
||||
if (logError) logger.error('Failed to log admin action', { error: getErrorMessage(logError) });
|
||||
|
||||
handleSuccess('Success', `User ${ban ? 'banned' : 'unbanned'} successfully.`);
|
||||
|
||||
@@ -175,7 +176,7 @@ export function ProfileManager() {
|
||||
_details: { role: newRole, previous_roles: currentRoles }
|
||||
});
|
||||
|
||||
if (logError) console.error('Error logging action:', logError);
|
||||
if (logError) logger.error('Failed to log admin action', { error: getErrorMessage(logError) });
|
||||
|
||||
handleSuccess('Success', 'User role updated successfully.');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user