Skip to content

Commit

Permalink
Rewrite Swizzling for NotFound theme
Browse files Browse the repository at this point in the history
  • Loading branch information
raikbitters committed Dec 20, 2023
1 parent 2a245af commit 90a8f95
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
35 changes: 17 additions & 18 deletions src/components/notFoundBlock/notFoundBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,32 @@

// eslint-disable-next-line import/no-extraneous-dependencies
import { PageMetadata } from '@docusaurus/theme-common';
import Layout from '@theme/Layout';
import React from 'react';

import Heading from '@theme/Heading';
import styles from './notFoundBlock.module.css';
import { SearchButton } from './searchButton';

export function NotFoundBlock() {
return (
<>
<PageMetadata title="Page Not Found" />
<Layout>
<div className={styles['not-found-content']}>
<div className={styles['not-found-img']} />
<h1 className={styles['not-found-title']}>Page Not Found</h1>
<p className={styles['not-found-text']}>
You may have used an outdated link as there have been some changes in the structure of
the documentation.
</p>
<p className={styles['not-found-text']}>
But it/'s clearly here somewhere! <br />
Please, use the <strong>keyword search</strong> to find it!
</p>
<div className={styles['search-button-wrapper']}>
<SearchButton />
</div>
<div className={styles['not-found-content']}>
<div className={styles['not-found-img']} />
<Heading as="h1" className={styles['not-found-title']}>
Page Not Found
</Heading>
<p className={styles['not-found-text']}>
You may have used an outdated link as there have been some changes in the structure of
documentation.
</p>
<p className={styles['not-found-text']}>
But it/'s clearly here somewhere! <br />
Please, use the <strong>keyword search</strong> to find it!
</p>
<div className={styles['search-button-wrapper']}>
<SearchButton />
</div>
</Layout>
</div>
</>
);
}
3 changes: 0 additions & 3 deletions src/theme/NotFound.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/theme/NotFound/Content/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { NotFoundBlock } from '../../../components/notFoundBlock';

export default NotFoundBlock;

0 comments on commit 90a8f95

Please sign in to comment.