Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
910 B
33 lines
910 B
import React, { Component } from 'react';
|
|
|
|
import { USERS_ENDPOINT } from '../constants/Endpoints';
|
|
import { restComponent } from '../components/RestComponent';
|
|
import ManageUsersForm from '../forms/ManageUsersForm';
|
|
import SectionContent from '../components/SectionContent';
|
|
|
|
class ManageUsers extends Component {
|
|
|
|
componentDidMount() {
|
|
this.props.loadData();
|
|
}
|
|
|
|
render() {
|
|
const { data, fetched, errorMessage } = this.props;
|
|
return (
|
|
<SectionContent title="Manage Users">
|
|
<ManageUsersForm
|
|
userData={data}
|
|
userDataFetched={fetched}
|
|
errorMessage={errorMessage}
|
|
onSubmit={this.props.saveData}
|
|
onReset={this.props.loadData}
|
|
setData={this.props.setData}
|
|
handleValueChange={this.props.handleValueChange}
|
|
/>
|
|
</SectionContent>
|
|
)
|
|
}
|
|
|
|
}
|
|
|
|
export default restComponent(USERS_ENDPOINT, ManageUsers);
|