import PropTypes from 'prop-types'; import { PureComponent } from 'react'; import { FormattedNumber, FormattedMessage } from 'react-intl'; import classNames from 'classnames'; import api from 'flavours/glitch/api'; import { Skeleton } from 'flavours/glitch/components/skeleton'; export default class ImpactReport extends PureComponent { static propTypes = { domain: PropTypes.string.isRequired, }; state = { loading: true, data: null, }; componentDidMount () { const { domain } = this.props; const params = { domain: domain, include_subdomains: true, }; api().post('/api/v1/admin/measures', { keys: ['instance_accounts', 'instance_follows', 'instance_followers'], start_at: null, end_at: null, instance_accounts: params, instance_follows: params, instance_followers: params, }).then(res => { this.setState({ loading: false, data: res.data, }); }).catch(err => { console.error(err); }); } render () { const { loading, data } = this.state; return (

0 })}> 0 })}>
{loading ? : }
{loading ? : }
{loading ? : }
); } }