//
// SPDX-License-Identifier: AGPL-3.0
-import * as React from 'react';
-import { compose } from 'redux';
+import React from 'react';
+import { compose, Dispatch } from 'redux';
import { reduxForm, InjectedFormProps, Field } from 'redux-form';
import { withDialog, WithDialogProps } from 'store/dialog/with-dialog';
import { FormDialog } from 'components/form-dialog/form-dialog';
reduxForm({
form: RENAME_FILE_DIALOG,
touchOnChange: true,
- onSubmit: (data: { path: string }, dispatch) => {
+ onSubmit: (data: { path: string }, dispatch: Dispatch) => {
dispatch<any>(renameFile(data.path));
}
})
</DialogContentText>
<Field
name='path'
- component={TextField}
+ component={TextField as any}
autoFocus={true}
validate={RENAME_FILE_VALIDATION}
/>