add function for getting an error if one permission has delete error state

This commit is contained in:
Maren Süwer
2018-09-07 11:34:14 +02:00
parent 46132585e8
commit 7c0e8ef90b
3 changed files with 54 additions and 3 deletions

View File

@@ -11,7 +11,8 @@ import {
createPermission,
isCreatePermissionPending,
getCreatePermissionFailure,
createPermissionReset
createPermissionReset,
getDeletePermissionsFailure
} from "../modules/permissions";
import Loading from "../../components/Loading";
import ErrorPage from "../../components/ErrorPage";
@@ -143,7 +144,7 @@ const mapStateToProps = (state, ownProps) => {
const repoName = ownProps.repoName;
const error =
getFetchPermissionsFailure(state, namespace, repoName) ||
getCreatePermissionFailure(state, namespace, repoName);
getCreatePermissionFailure(state, namespace, repoName); //|| getDeletePermissionsFailure(state, namespace, repoName);
const loading = isFetchPermissionsPending(state, namespace, repoName);
const permissions = getPermissionsOfRepo(state, namespace, repoName);
const loadingCreatePermission = isCreatePermissionPending(