mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
31 lines
869 B
TypeScript
31 lines
869 B
TypeScript
import React, { Component } from 'react';
|
|
|
|
import {restController, RestControllerProps, RestFormLoader, SectionContent } from '../components';
|
|
import { SECURITY_SETTINGS_ENDPOINT } from '../api';
|
|
|
|
import SecuritySettingsForm from './SecuritySettingsForm';
|
|
import { SecuritySettings } from './types';
|
|
|
|
type SecuritySettingsControllerProps = RestControllerProps<SecuritySettings>;
|
|
|
|
class SecuritySettingsController extends Component<SecuritySettingsControllerProps> {
|
|
|
|
componentDidMount() {
|
|
this.props.loadData();
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<SectionContent title="Security Settings" titleGutter>
|
|
<RestFormLoader
|
|
{...this.props}
|
|
render={formProps => <SecuritySettingsForm {...formProps} />}
|
|
/>
|
|
</SectionContent>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
export default restController(SECURITY_SETTINGS_ENDPOINT, SecuritySettingsController);
|