mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05: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 { RouteComponentProps, withRouter } from "react-router-dom";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { History } from "history";
|
||||
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 {
|
||||
fetchRolesByPage,
|
||||
getFetchRolesFailure,
|
||||
@@ -71,7 +70,11 @@ class RepositoryRoles extends React.Component<Props> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { t, loading } = this.props;
|
||||
const { t, loading, error } = this.props;
|
||||
|
||||
if (error) {
|
||||
return <ErrorNotification />;
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return <Loading />;
|
||||
|
||||
Reference in New Issue
Block a user