import React from 'react'; import Button from 'component/button'; import { FormRow } from 'component/common/form'; import { doShowSnackBar } from 'redux/actions/app'; import lbry from '../lbry.js'; class ReportPage extends React.Component { constructor(props) { super(props); this.state = { submitting: false, message: '', }; } submitMessage() { const message = this.state.message; if (message) { this.setState({ submitting: true, }); lbry.report_bug({ message }).then(() => { this.setState({ submitting: false, }); // Display global notice const action = doShowSnackBar({ message: __('Message received! Thanks for helping.'), isError: false, }); window.app.store.dispatch(action); }); this.setState({ message: '' }); } } onMessageChange(event) { this.setState({ message: event.target.value, }); } render() { return (

{__('Report an Issue')}

{__( 'Please describe the problem you experienced and any information you think might be useful to us. Links to screenshots are great!' )}

{ this.onMessageChange(event); }} placeholder={__('Description of your issue')} />

{__('Developer?')}

{__('You can also')}{' '}
); } } export default ReportPage;