mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
Minor refactoring
This commit is contained in:
@@ -69,8 +69,8 @@ class BackendErrorNotification extends React.Component<Props> {
|
|||||||
const { error, t } = this.props;
|
const { error, t } = this.props;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{this.renderContext(error)}
|
{this.renderContext()}
|
||||||
{this.renderMoreInformationLink(error)}
|
{this.renderMoreInformationLink()}
|
||||||
<div className="level is-size-7">
|
<div className="level is-size-7">
|
||||||
<div className="left">
|
<div className="left">
|
||||||
{t("errors.transactionId")} {error.transactionId}
|
{t("errors.transactionId")} {error.transactionId}
|
||||||
@@ -83,7 +83,8 @@ class BackendErrorNotification extends React.Component<Props> {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
renderContext = (error: BackendError) => {
|
renderContext = () => {
|
||||||
|
const { error, t} = this.props;
|
||||||
if (error.context) {
|
if (error.context) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -104,8 +105,8 @@ class BackendErrorNotification extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
renderMoreInformationLink = (error: BackendError) => {
|
renderMoreInformationLink = () => {
|
||||||
const { t } = this.props;
|
const { error, t } = this.props;
|
||||||
if (error.url) {
|
if (error.url) {
|
||||||
return (
|
return (
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user