/* jshint ignore:start */ import React from 'react'; import Blankslate from './blankslate'; import Loader from './loader'; import Form from './form'; import ajax from 'misago/services/ajax'; import snackbar from 'misago/services/snackbar'; export default class extends React.Component { constructor(props) { super(props); this.state = { loading: true, groups: null }; } componentDidMount() { ajax.get(this.props.api).then( (groups) => { this.setState({ loading: false, groups }); }, (rejection) => { snackbar.apiError(rejection); if (this.props.cancel) { this.props.cancel(); } } ); } render() { const { groups, loading } = this.state; return (

{gettext("Edit details")}

); } } export function FormDisplay({ api, display, groups, onCancel, onSuccess }) { if (!display) return null; return (
); }