import * as React from 'react'; import { IApplication } from '../../models/application'; import { Loader } from '../base/loader'; import { react2angular } from 'react2angular'; import { ErrorBoundary } from '../base/error-boundary'; import { useTranslation } from 'react-i18next'; import { useForm, SubmitHandler } from 'react-hook-form'; import { FabButton } from '../base/fab-button'; import { EditorialBlockForm } from '../editorial-block/editorial-block-form'; declare const Application: IApplication; interface MachinesSettingsProps { onError: (message: string) => void, onSuccess: (message: string) => void, } /** * Machines settings */ export const MachinesSettings: React.FC = () => { const { t } = useTranslation('admin'); const { register, control, formState, handleSubmit } = useForm(); /** * Callback triggered when the form is submitted: save the settings */ const onSubmit: SubmitHandler = (data) => { console.log(data); }; return (

{t('app.admin.machines_settings.title')}

{t('app.admin.machines_settings.save')}
); }; const MachinesSettingsWrapper: React.FC = (props) => { return ( ); }; Application.Components.component('machinesSettings', react2angular(MachinesSettingsWrapper, ['onError', 'onSuccess']));