15803: Display loading screen during "get user info" and "self activate"
[arvados.git] / src / views-components / sharing-dialog / sharing-public-access-form.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { reduxForm } from 'redux-form';
6 import { compose } from 'redux';
7 import { connect } from 'react-redux';
8 import SharingPublicAccessFormComponent from './sharing-public-access-form-component';
9 import { SHARING_PUBLIC_ACCESS_FORM_NAME } from '~/store/sharing-dialog/sharing-dialog-types';
10 import { RootState } from '~/store/store';
11 import { getSharingPublicAccessFormData } from '../../store/sharing-dialog/sharing-dialog-types';
12
13 export const SharingPublicAccessForm = compose(
14     reduxForm(
15         { form: SHARING_PUBLIC_ACCESS_FORM_NAME }
16     ),
17     connect(
18         (state: RootState) => {
19             const { visibility } = getSharingPublicAccessFormData(state);
20             return { visibility };
21         }
22     )
23 )(SharingPublicAccessFormComponent);