update and fix messanger
This commit is contained in:
@@ -6,6 +6,7 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { useToast } from '@/components/id/toast-provider';
|
||||
import { useAvatarUrl } from '@/hooks/use-avatar-url';
|
||||
import { apiFetch, getApiErrorMessage, uploadMediaObject } from '@/lib/api';
|
||||
import { dispatchAvatarUpdated } from '@/lib/avatar-events';
|
||||
import { VerificationBadge } from '@/components/id/verification-badge';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
@@ -72,6 +73,7 @@ export function AvatarUpload({
|
||||
|
||||
await onUpdated();
|
||||
await refreshAvatarUrl();
|
||||
dispatchAvatarUpdated(userId);
|
||||
showToast('Аватар обновлён');
|
||||
} catch (error) {
|
||||
const message = getApiErrorMessage(error, 'Не удалось загрузить аватар');
|
||||
|
||||
Reference in New Issue
Block a user