From 485b43ed7e312ab2c3bad446132c57d6a0ce7de4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 27 Jun 2022 09:30:15 +0200 Subject: [Glitch] Add notifications for new reports Port 2936f42a14cfdca70d4a9653dab29382315945e7 to glitch-soc Signed-off-by: Claire --- .../notifications/containers/admin_report_container.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/javascript/flavours/glitch/features/notifications/containers/admin_report_container.js (limited to 'app/javascript/flavours/glitch/features/notifications/containers/admin_report_container.js') diff --git a/app/javascript/flavours/glitch/features/notifications/containers/admin_report_container.js b/app/javascript/flavours/glitch/features/notifications/containers/admin_report_container.js new file mode 100644 index 000000000..4198afce8 --- /dev/null +++ b/app/javascript/flavours/glitch/features/notifications/containers/admin_report_container.js @@ -0,0 +1,13 @@ +import { connect } from 'react-redux'; +import { makeGetReport } from 'flavours/glitch/selectors'; +import AdminReport from '../components/admin_report'; + +const mapStateToProps = (state, { notification }) => { + const getReport = makeGetReport(); + + return { + report: notification.get('report') ? getReport(state, notification.get('report'), notification.getIn(['report', 'target_account', 'id'])) : null, + }; +}; + +export default connect(mapStateToProps)(AdminReport); -- cgit