diff --git a/packages/core/src/layout/ErrorPage/ErrorPage.test.tsx b/packages/core/src/layout/ErrorPage/ErrorPage.test.tsx
index 1309fdf474..06c12041b9 100644
--- a/packages/core/src/layout/ErrorPage/ErrorPage.test.tsx
+++ b/packages/core/src/layout/ErrorPage/ErrorPage.test.tsx
@@ -23,11 +23,7 @@ describe('', () => {
it('should render with status code, status message and go back link', () => {
const rendered = render(
wrapInThemedTestApp(
- {} }}
- />,
+ ,
),
);
rendered.getByText(/page not found/i);
diff --git a/packages/core/src/layout/ErrorPage/ErrorPage.tsx b/packages/core/src/layout/ErrorPage/ErrorPage.tsx
index 49b79ef925..14241c1ee7 100644
--- a/packages/core/src/layout/ErrorPage/ErrorPage.tsx
+++ b/packages/core/src/layout/ErrorPage/ErrorPage.tsx
@@ -19,13 +19,11 @@ import { Typography, Link, Grid } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import { BackstageTheme } from '@backstage/theme';
import MicDrop from './MicDrop';
+import { useHistory } from 'react-router';
interface IErrorPageProps {
status: string;
statusMessage: string;
- history: {
- goBack: () => void;
- };
}
const useStyles = makeStyles((theme) => ({
@@ -40,8 +38,9 @@ const useStyles = makeStyles((theme) => ({
},
}));
-const ErrorPage = ({ status, statusMessage, history }: IErrorPageProps) => {
+const ErrorPage = ({ status, statusMessage }: IErrorPageProps) => {
const classes = useStyles();
+ const history = useHistory();
return (