2022-03-11 03:33:25 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
import { Notifications as NotificationsCollection } from '/imports/api/meetings';
|
|
|
|
import { notify } from '/imports/ui/services/notification';
|
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
|
|
|
|
export default withTracker(() => {
|
|
|
|
NotificationsCollection.find({}).observe({
|
|
|
|
added: (obj) => {
|
|
|
|
notify(
|
|
|
|
<FormattedMessage
|
|
|
|
id={obj.messageId}
|
|
|
|
values={obj.messageValues}
|
2022-03-30 22:01:12 +08:00
|
|
|
description={obj.messageDescription}
|
2022-03-11 03:33:25 +08:00
|
|
|
/>,
|
|
|
|
obj.notificationType,
|
|
|
|
obj.icon,
|
|
|
|
);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
return {};
|
|
|
|
})(() => null);
|