use ErrorNotification instead of ErrorPage, because we are already wrapped by a Page

This commit is contained in:
Sebastian Sdorra
2019-04-03 17:17:58 +02:00
parent 7bbafee1ed
commit ea986e3b09
3 changed files with 3 additions and 14 deletions

View File

@@ -44,8 +44,6 @@
"subtitle": "Erstellen eines neuen Repository"
},
"branches": {
"errorTitle": "Fehler",
"errorSubtitle": "Unbekannter Branch Fehler",
"overview": {
"title": "Übersicht aller verfügbaren Branches",
"createButton": "Branch erstellen"

View File

@@ -44,8 +44,6 @@
"subtitle": "Create a new repository"
},
"branches": {
"errorTitle": "Error",
"errorSubtitle": "Unknown branch error",
"overview": {
"title": "Overview of all branches",
"createButton": "Create Branch"

View File

@@ -3,7 +3,6 @@ import React from "react";
import BranchView from "../components/BranchView";
import { connect } from "react-redux";
import { Redirect, Route, Switch, withRouter } from "react-router-dom";
import { translate } from "react-i18next";
import type { Repository, Branch } from "@scm-manager/ui-types";
import {
fetchBranch,
@@ -11,7 +10,7 @@ import {
getFetchBranchFailure,
isFetchBranchPending
} from "../modules/branches";
import { ErrorPage, Loading } from "@scm-manager/ui-components";
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
import type { History } from "history";
import { NotFoundError } from "@scm-manager/ui-components";
@@ -23,7 +22,6 @@ type Props = {
error?: Error,
// context props
t: string => string,
history: History,
match: any,
location: any,
@@ -56,7 +54,6 @@ class BranchRoot extends React.Component<Props> {
branch,
loading,
error,
t,
match,
location
} = this.props;
@@ -69,11 +66,7 @@ class BranchRoot extends React.Component<Props> {
}
return (
<ErrorPage
title={t("branches.errorTitle")}
subtitle={t("branches.errorSubtitle")}
error={error}
/>
<ErrorNotification error={error} />
);
}
@@ -122,5 +115,5 @@ export default withRouter(
connect(
mapStateToProps,
mapDispatchToProps
)(translate("repos")(BranchRoot))
)(BranchRoot)
);