TechDocsNotFound now uses ErrorPage from core with an optional docPath parameter

This commit is contained in:
David Sykes
2020-07-30 11:19:12 +01:00
parent 5ae8479e39
commit fa708d6572
@@ -15,20 +15,16 @@
*/
import React from 'react';
import { Typography, Button } from '@material-ui/core';
import { TechDocsPageWrapper } from './TechDocsPageWrapper';
import { ErrorPage } from '@backstage/core';
export const TechDocsNotFound = () => {
return (
<TechDocsPageWrapper
title="Documentation"
subtitle="Documentation available in Backstage"
>
<Typography>Error: Documentation not found</Typography>
<Typography>Path: {window.location.pathname}</Typography>
<Button color="primary" onClick={() => window.history.back()}>
Go back
</Button>
</TechDocsPageWrapper>
<div>
<ErrorPage
status="404"
statusMessage="Documentation not found"
docPath={window.location.pathname}
/>
</div>
);
};