Add header to toplevel error boundary (#1613)

In the event of a reload due to a change of focus, possible error boundaries were displayed without the SCM-Manager header. This change complements the appropriate header.
This commit is contained in:
Florian Scholdei
2021-04-07 16:18:36 +02:00
committed by GitHub
parent 84ba05bab8
commit 43c5c44905
2 changed files with 9 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
- type: fixed
description: Add header to toplevel error boundary ([#1613](https://github.com/scm-manager/scm-manager/pull/1613))

View File

@@ -23,7 +23,7 @@
*/
import React, { FC, useState } from "react";
import App from "./App";
import { ErrorBoundary, Loading } from "@scm-manager/ui-components";
import { ErrorBoundary, Loading, Header } from "@scm-manager/ui-components";
import PluginLoader from "./PluginLoader";
import ScrollToTop from "./ScrollToTop";
import IndexErrorPage from "./IndexErrorPage";
@@ -37,7 +37,12 @@ const Index: FC = () => {
// TODO check componentDidUpdate method for anonymous user stuff
if (error) {
return <IndexErrorPage error={error} />;
return (
<>
<Header />
<IndexErrorPage error={error} />
</>
);
}
if (isLoading || !data) {
return <Loading />;