mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 01:11:32 +03:00
feat: toasts (#23298)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { isHttpError } from '@immich/sdk';
|
||||
import { notificationController, NotificationType } from '../components/shared-components/notification/notification';
|
||||
import { toastManager } from '@immich/ui';
|
||||
|
||||
export function getServerErrorMessage(error: unknown) {
|
||||
if (!isHttpError(error)) {
|
||||
@@ -34,7 +34,7 @@ export function handleError(error: unknown, message: string) {
|
||||
|
||||
const errorMessage = serverMessage || message;
|
||||
|
||||
notificationController.show({ message: errorMessage, type: NotificationType.Error });
|
||||
toastManager.danger(errorMessage);
|
||||
|
||||
return errorMessage;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user