X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/38d27e9783f7f760cee84cc225e86144069848c4..HEAD:/src/views-components/sharing-dialog/sharing-invitation-form.tsx?ds=sidebyside

diff --git a/src/views-components/sharing-dialog/sharing-invitation-form.tsx b/src/views-components/sharing-dialog/sharing-invitation-form.tsx
index e82edf7c..33154732 100644
--- a/src/views-components/sharing-dialog/sharing-invitation-form.tsx
+++ b/src/views-components/sharing-dialog/sharing-invitation-form.tsx
@@ -3,18 +3,25 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { reduxForm } from 'redux-form';
-import { connect } from 'react-redux';
-import { compose } from 'redux';
 import SharingInvitationFormComponent from './sharing-invitation-form-component';
 import { SHARING_INVITATION_FORM_NAME } from 'store/sharing-dialog/sharing-dialog-types';
 import { PermissionLevel } from 'models/permission';
 
-export const SharingInvitationForm = compose(
-    connect(() => ({
+interface InvitationFormData {
+    permissions: PermissionLevel;
+    invitedPeople: string[];
+}
+
+interface SaveProps {
+    onSave: () => void;
+    saveEnabled: boolean;
+}
+
+export const SharingInvitationForm =
+    reduxForm<InvitationFormData, SaveProps>({
+        form: SHARING_INVITATION_FORM_NAME,
         initialValues: {
             permissions: PermissionLevel.CAN_READ,
             invitedPeople: [],
         }
-    })),
-    reduxForm({ form: SHARING_INVITATION_FORM_NAME })
-)(SharingInvitationFormComponent);
\ No newline at end of file
+    })(SharingInvitationFormComponent);
