From 1e2d8f72823f4f849442c4d40db95c0535ab7d4f Mon Sep 17 00:00:00 2001 From: srgooglo Date: Wed, 2 Mar 2022 16:07:20 +0100 Subject: [PATCH] use `createIconRender` --- packages/app/src/extensions/notifications/index.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app/src/extensions/notifications/index.jsx b/packages/app/src/extensions/notifications/index.jsx index e1dde115..fafb75e9 100644 --- a/packages/app/src/extensions/notifications/index.jsx +++ b/packages/app/src/extensions/notifications/index.jsx @@ -1,8 +1,8 @@ import React from "react" import { notification as Notf } from "antd" -import { Icons } from "components/Icons" +import { Icons, createIconRender } from "components/Icons" import { Translation } from "react-i18next" -import { Haptics, ImpactStyle } from "@capacitor/haptics" +import { Haptics } from "@capacitor/haptics" class NotificationController { getSoundVolume = () => { @@ -31,7 +31,7 @@ class NotificationController { {(t) => t(notification.description)} , duration: notification.duration ?? 4, - icon: React.isValidElement(notification.icon) ? notification.icon : (Icons[notification.icon] ?? ), + icon: React.isValidElement(notification.icon) ? notification.icon : (createIconRender(notification.icon) ?? ), }) }