about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/notifications/containers/admin_report_container.js
blob: 4198afce8b8b88caa65e1c1429d59cfef3c11f1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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);