From ea986e3b093f32238001bf1e4e1b6d2c55faacda Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 3 Apr 2019 17:17:58 +0200 Subject: [PATCH] use ErrorNotification instead of ErrorPage, because we are already wrapped by a Page --- scm-ui/public/locales/de/repos.json | 2 -- scm-ui/public/locales/en/repos.json | 2 -- scm-ui/src/repos/branches/containers/BranchRoot.js | 13 +++---------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/scm-ui/public/locales/de/repos.json b/scm-ui/public/locales/de/repos.json index 6170c9021f..6f7846df72 100644 --- a/scm-ui/public/locales/de/repos.json +++ b/scm-ui/public/locales/de/repos.json @@ -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" diff --git a/scm-ui/public/locales/en/repos.json b/scm-ui/public/locales/en/repos.json index 4eeddea8b2..89492f427d 100644 --- a/scm-ui/public/locales/en/repos.json +++ b/scm-ui/public/locales/en/repos.json @@ -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" diff --git a/scm-ui/src/repos/branches/containers/BranchRoot.js b/scm-ui/src/repos/branches/containers/BranchRoot.js index 2e8f910275..2e9fb10f73 100644 --- a/scm-ui/src/repos/branches/containers/BranchRoot.js +++ b/scm-ui/src/repos/branches/containers/BranchRoot.js @@ -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 { branch, loading, error, - t, match, location } = this.props; @@ -69,11 +66,7 @@ class BranchRoot extends React.Component { } return ( - + ); } @@ -122,5 +115,5 @@ export default withRouter( connect( mapStateToProps, mapDispatchToProps - )(translate("repos")(BranchRoot)) + )(BranchRoot) );