mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
34 lines
775 B
TypeScript
34 lines
775 B
TypeScript
import { Component } from 'react';
|
|
|
|
import {
|
|
restController,
|
|
RestControllerProps,
|
|
RestFormLoader,
|
|
SectionContent
|
|
} from '../components';
|
|
import { NTP_STATUS_ENDPOINT } from '../api';
|
|
|
|
import NTPStatusForm from './NTPStatusForm';
|
|
import { NTPStatus } from './types';
|
|
|
|
type NTPStatusControllerProps = RestControllerProps<NTPStatus>;
|
|
|
|
class NTPStatusController extends Component<NTPStatusControllerProps> {
|
|
componentDidMount() {
|
|
this.props.loadData();
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<SectionContent title="NTP Status">
|
|
<RestFormLoader
|
|
{...this.props}
|
|
render={(formProps) => <NTPStatusForm {...formProps} />}
|
|
/>
|
|
</SectionContent>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default restController(NTP_STATUS_ENDPOINT, NTPStatusController);
|