[Glitch] Add notifications for new reports

Port 2936f42a14 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2022-06-27 09:30:15 +02:00
committed by Claire
parent f218e633b4
commit 485b43ed7e
12 changed files with 279 additions and 11 deletions

View File

@@ -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);