mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
fix(v2): website feedback page hydration bug (#3269)
This commit is contained in:
parent
98ccb3725d
commit
e118fcd4e1
1 changed files with 18 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue