diff --git a/src/components/notification/NotificationComponent.tsx b/src/components/notification/NotificationComponent.tsx index 31f8cdf188..0cc1303965 100644 --- a/src/components/notification/NotificationComponent.tsx +++ b/src/components/notification/NotificationComponent.tsx @@ -2,13 +2,12 @@ import React from "react"; import PromoBar from "../promo-bar/PromoBar"; interface NotificationComponentProps { - notificationMessage: string | null; + notificationMessage: string; } const NotificationComponent: React.FC = ({ notificationMessage }) => { - if (!notificationMessage) return null; return ; }; diff --git a/src/core/utils/useNotificationMessage.tsx b/src/core/utils/useNotificationMessage.tsx index 3dbc266ad6..558cc7eda2 100644 --- a/src/core/utils/useNotificationMessage.tsx +++ b/src/core/utils/useNotificationMessage.tsx @@ -28,7 +28,10 @@ export const useNotificationMessage = ({ }; return [ - () => , + () => + notificationMessage ? ( + + ) : null, handleNotificationMessage ]; };