import * as React from "react"; import * as Strings from "~/common/strings"; import * as Constants from "~/common/constants"; import * as Actions from "~/common/actions"; import * as SVG from "~/common/svg"; import * as System from "~/components/system"; import { css } from "@emotion/react"; import { dispatchCustomEvent } from "~/common/custom-events"; export default class SidebarFilecoinArchive extends React.Component { state = { response: null }; async componentDidMount() {} _handleMakeDeal = async () => { const response = await Actions.archive(); alert("A new Filecoin deal is being processed."); }; _handleSubmit = async (e) => { if (e) { e.persist(); } this.props.onSidebarLoading(true); await this._handleMakeDeal(); await this.props.onRehydrate(); this.props.onSidebarLoading(false); }; _handleCancel = () => { this.props.onCancel(); }; _handleChange = (e) => { this.setState({ [e.target.name]: e.target.value }); }; render() { return ( Make Filecoin storage deal This will archive all of your data onto the Filecoin Network. Make storage deal {this.state.response ? (
{JSON.stringify(this.state.response, null, 2)}
) : null}
); } }