18559: Add empty user profile page for 404
[arvados-workbench2.git] / src / views / user-profile-panel / user-profile-panel.tsx
index 207a98fee171df5e779086ae9b1ca5c7eaf53189..a90d44a9a7a7d207e5ca3d4ea6b425acca21d356 100644 (file)
@@ -7,7 +7,7 @@ import { compose, Dispatch } from 'redux';
 import { reduxForm, isPristine, isValid } from 'redux-form';
 import { connect } from 'react-redux';
 import { UserResource } from 'models/user';
-import { saveEditedUser } from 'store/user-profile/user-profile-actions';
+import { getUserProfileIsInaccessible, saveEditedUser } from 'store/user-profile/user-profile-actions';
 import { UserProfilePanelRoot, UserProfilePanelRootDataProps } from 'views/user-profile-panel/user-profile-panel-root';
 import { USER_PROFILE_FORM } from "store/user-profile/user-profile-actions";
 import { matchUserProfileRoute } from 'routes/routes';
@@ -23,6 +23,7 @@ const mapStateToProps = (state: RootState): UserProfilePanelRootDataProps => {
     isSelf: state.auth.user!.uuid === uuid,
     isPristine: isPristine(USER_PROFILE_FORM)(state),
     isValid: isValid(USER_PROFILE_FORM)(state),
+    isInaccessible: getUserProfileIsInaccessible(state.properties) || false,
     localCluster: state.auth.localCluster,
     userUuid: uuid,
     resources: state.resources,