import React from 'react'; import superagent from 'superagent'; import { fromUnixTime } from "date-fns"; import { formatInTimeZone } from 'date-fns-tz' import { Table, Segment, Button, Modal, Header, Message, Icon } from 'semantic-ui-react' import { DEFAULT_TIMEZONE } from '../../CloudApi/Constants.js'; export default class SocialBlockList extends React.Component { constructor(props) { super(props); this.state = { blocked: [], pendingGraphItemId: null, showDialog: false }; } async componentDidMount() { return this.reload(); } async reload() { this.setState({ loading: true }); try { this.setState({ blockeds: [] }); const res = await superagent.get(`/cloud/admin/account/${this.props.account.id}/social/graph/blocked`).accept('json'); console.log(res.body); this.setState({ blockeds: res.body.items }); } catch (e) { console.log(e); } this.setState({ loading: false }); } onShowDialog(pendingGraphItemId, e) { e.preventDefault(); this.setState({showDialog: true, pendingGraphItemId }); } closeDialog(e) { this.setState({showDialog: false, pendingGraphItemId: null }); } async onConfirmDeleteBlockEntry(e) { e.preventDefault(); try { const result = await superagent.delete(`/cloud/admin/social/graph/${this.state.pendingGraphItemId}`).accept('json'); this.setState({ showDialog: false, pendingGraphItemId: null }); await this.reload(); } catch (e) { this.setState({ showDialog: false, pendingGraphItemId: null }); console.log(e); } } render() { if (this.state.loading) { return   } if (this.state.blockeds) { const blockeds = _.orderBy(this.state.blockeds, ["createdAt"], ["desc"]); return (

Are you sure you want to do this?

THIS IS A SERIOUS ACTION. This will allow the user to be able to see the target account again. The block deletion will be noted on the Bigscreen Discord server.

Only confirm if you are 100% sure the block entry was created in error, and you have confirmation from the account who created the block.
Date Target Account Admin {blockeds.map(blocked => { return ( {formatInTimeZone(fromUnixTime(blocked.createdAt / 1000), DEFAULT_TIMEZONE, 'yyyy-MM-dd HH:mm:ss zzz')} {blocked.targetSocialProfileSnapshot.username} ) })}
); } else { return null; } } }