mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
add missing error handling
This commit is contained in:
@@ -25,9 +25,8 @@ import React from "react";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { RouteComponentProps, withRouter } from "react-router-dom";
|
import { RouteComponentProps, withRouter } from "react-router-dom";
|
||||||
import { WithTranslation, withTranslation } from "react-i18next";
|
import { WithTranslation, withTranslation } from "react-i18next";
|
||||||
import { History } from "history";
|
|
||||||
import { PagedCollection, RepositoryRole } from "@scm-manager/ui-types";
|
import { PagedCollection, RepositoryRole } from "@scm-manager/ui-types";
|
||||||
import { CreateButton, LinkPaginator, Loading, Notification, Subtitle, Title, urls } from "@scm-manager/ui-components";
|
import { CreateButton, LinkPaginator, Loading, Notification, Subtitle, Title, urls, ErrorNotification } from "@scm-manager/ui-components";
|
||||||
import {
|
import {
|
||||||
fetchRolesByPage,
|
fetchRolesByPage,
|
||||||
getFetchRolesFailure,
|
getFetchRolesFailure,
|
||||||
@@ -71,7 +70,11 @@ class RepositoryRoles extends React.Component<Props> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { t, loading } = this.props;
|
const { t, loading, error } = this.props;
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
return <ErrorNotification />;
|
||||||
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return <Loading />;
|
return <Loading />;
|
||||||
|
|||||||
Reference in New Issue
Block a user