rename message to title param

This commit is contained in:
SrGooglo 2023-05-16 19:33:54 +00:00
parent 0ebbd40cef
commit 9704887665

View File

@ -47,21 +47,21 @@ export default class NotificationCore extends Core {
duration: notification.duration ?? 4, duration: notification.duration ?? 4,
} }
if (notification.message) { if (notification.title) {
switch (typeof notification.message) { switch (typeof notification.title) {
case "function": { case "function": {
notfObj.message = React.createElement(notification.message) notfObj.message = React.createElement(notification.title)
break break
} }
case "object": { case "object": {
notfObj.message = notification.message notfObj.message = notification.title
break break
} }
default: { default: {
notfObj.message = <Translation> notfObj.message = <Translation>
{(t) => t(notification.message)} {(t) => t(notification.title)}
</Translation> </Translation>
break break