mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
use createIconRender
This commit is contained in:
parent
696993d8d3
commit
1e2d8f7282
@ -1,8 +1,8 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { notification as Notf } from "antd"
|
import { notification as Notf } from "antd"
|
||||||
import { Icons } from "components/Icons"
|
import { Icons, createIconRender } from "components/Icons"
|
||||||
import { Translation } from "react-i18next"
|
import { Translation } from "react-i18next"
|
||||||
import { Haptics, ImpactStyle } from "@capacitor/haptics"
|
import { Haptics } from "@capacitor/haptics"
|
||||||
|
|
||||||
class NotificationController {
|
class NotificationController {
|
||||||
getSoundVolume = () => {
|
getSoundVolume = () => {
|
||||||
@ -31,7 +31,7 @@ class NotificationController {
|
|||||||
{(t) => t(notification.description)}
|
{(t) => t(notification.description)}
|
||||||
</Translation>,
|
</Translation>,
|
||||||
duration: notification.duration ?? 4,
|
duration: notification.duration ?? 4,
|
||||||
icon: React.isValidElement(notification.icon) ? notification.icon : (Icons[notification.icon] ?? <Icons.Bell />),
|
icon: React.isValidElement(notification.icon) ? notification.icon : (createIconRender(notification.icon) ?? <Icons.Bell />),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user