bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/notifications/container.jsx
2022-03-10 16:33:25 -03:00

23 lines
659 B
JavaScript

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}
description="Notification for when the recording starts"
/>,
obj.notificationType,
obj.icon,
);
},
});
return {};
})(() => null);