From a67252b8968423a2d8775b703c641955fd040d88 Mon Sep 17 00:00:00 2001 From: enesozturk Date: Sun, 14 Jan 2024 08:56:38 +0300 Subject: [PATCH] refactor: update toast messages --- .../NotificationsLayout/UnsubscribeModal/index.tsx | 6 ++---- src/utils/toasts.ts | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/notifications/NotificationsLayout/UnsubscribeModal/index.tsx b/src/components/notifications/NotificationsLayout/UnsubscribeModal/index.tsx index adf7ed50..d9225e56 100644 --- a/src/components/notifications/NotificationsLayout/UnsubscribeModal/index.tsx +++ b/src/components/notifications/NotificationsLayout/UnsubscribeModal/index.tsx @@ -10,7 +10,7 @@ import Text from '@/components/general/Text' import W3iContext from '@/contexts/W3iContext/context' import { useModals } from '@/utils/hooks' import { unsubscribeModalService } from '@/utils/store' -import { showErrorMessageToast, showSuccessMessageToast } from '@/utils/toasts' +import { showDefaultToast, showErrorMessageToast } from '@/utils/toasts' import './UnsubscribeModal.scss' @@ -32,9 +32,7 @@ export const UnsubscribeModal: React.FC = () => { notifyClientProxy.observeOne('notify_delete', { next: () => { unsubscribeModalService.closeModal() - showSuccessMessageToast( - `Successfully unsubscribed from ${app ? app.metadata.name : `dapp`}` - ) + showDefaultToast(`Unsubscribed from ${app ? app.metadata.name : `dapp`}`) setLoading(false) navigate('/notifications/new-app') } diff --git a/src/utils/toasts.ts b/src/utils/toasts.ts index 7b800609..c5255b12 100644 --- a/src/utils/toasts.ts +++ b/src/utils/toasts.ts @@ -1,5 +1,9 @@ import toast from 'react-hot-toast' +export const showDefaultToast = (message: string) => { + toast(message) +} + export const showSuccessMessageToast = (message: string) => { toast.success(message) }