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.

32 lines
947 B

5 years ago
5 years ago
  1. import React, { Component } from 'react';
  2. import { SECURITY_SETTINGS_ENDPOINT } from '../constants/Endpoints';
  3. import { restComponent } from '../components/RestComponent';
  4. import SecuritySettingsForm from '../forms/SecuritySettingsForm';
  5. import SectionContent from '../components/SectionContent';
  6. class SecuritySettings extends Component {
  7. componentDidMount() {
  8. this.props.loadData();
  9. }
  10. render() {
  11. const { data, fetched, errorMessage, saveData, loadData, handleValueChange } = this.props;
  12. return (
  13. <SectionContent title="Security Settings">
  14. <SecuritySettingsForm
  15. securitySettings={data}
  16. securitySettingsFetched={fetched}
  17. errorMessage={errorMessage}
  18. onSubmit={saveData}
  19. onReset={loadData}
  20. handleValueChange={handleValueChange}
  21. />
  22. </SectionContent>
  23. )
  24. }
  25. }
  26. export default restComponent(SECURITY_SETTINGS_ENDPOINT, SecuritySettings);