Skip to content

Commit

Permalink
fix: feedback page hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
mecm1993 committed Aug 12, 2020
1 parent 97faf7e commit 72d0f96
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions website/src/theme/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ import Layout from '@theme/Layout';
import Feedback from '../pages/feedback';

function NotFound({location}: {location: {pathname: string}}): JSX.Element {
if (/^\/feedback/.test(location.pathname)) {
return <Feedback />;
}

return (
<Layout title="Page Not Found">
<div className="container margin-vert--xl" data-canny>
<div className="row">
<div className="col col--6 col--offset-3">
<h1 className="hero__title">Page Not Found</h1>
<p>We could not find what you were looking for.</p>
<p>
Please contact the owner of the site that linked you to the
original URL and let them know their link is broken.
</p>
if (/^\/\bfeedback\b/.test(location.pathname)) {
return <Feedback />
} else {
return (
<Layout title="Page Not Found">
<div className="container margin-vert--xl" data-canny>
<div className="row">
<div className="col col--6 col--offset-3">
<h1 className="hero__title">Page Not Found</h1>
<p>We could not find what you were looking for.</p>
<p>
Please contact the owner of the site that linked you to the
original URL and let them know their link is broken.
</p>
</div>
</div>
</div>
</div>
</Layout>
);
</Layout>
);
}
}

export default NotFound;

0 comments on commit 72d0f96

Please sign in to comment.