diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-29 12:13:34 +0200 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-29 18:30:05 +0200 | 
| commit | 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 (patch) | |
| tree | bfc2b4a475cb06a787e2c4bdf284165644e82952 /src/pages/404.tsx | |
| parent | 5324664e87bedfaa01ba62c0c847ef5b861e69b3 (diff) | |
chore: remove old pages, components, helpers and types
Since I'm using new components, I will also rewrite the GraphQL queries
so it is easier to start from scratch.
Diffstat (limited to 'src/pages/404.tsx')
| -rw-r--r-- | src/pages/404.tsx | 85 | 
1 files changed, 0 insertions, 85 deletions
| diff --git a/src/pages/404.tsx b/src/pages/404.tsx deleted file mode 100644 index 24c6951..0000000 --- a/src/pages/404.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import { getLayout } from '@components/Layouts/Layout'; -import PostHeader from '@components/PostHeader/PostHeader'; -import styles from '@styles/pages/Page.module.scss'; -import { NextPageWithLayout } from '@ts/types/app'; -import { settings } from '@utils/config'; -import { getIntlInstance, loadTranslation } from '@utils/helpers/i18n'; -import { GetStaticProps, GetStaticPropsContext } from 'next'; -import Head from 'next/head'; -import Link from 'next/link'; -import { FormattedMessage, useIntl } from 'react-intl'; - -const Error404: NextPageWithLayout = () => { -  const intl = useIntl(); - -  const pageTitle = intl.formatMessage( -    { -      defaultMessage: 'Error 404: Page not found - {websiteName}', -      description: '404Page: SEO - Page title', -      id: '310o3F', -    }, -    { websiteName: settings.name } -  ); -  const pageDescription = intl.formatMessage({ -    defaultMessage: 'Page not found.', -    description: '404Page: SEO - Meta description', -    id: '48Ww//', -  }); - -  return ( -    <> -      <Head> -        <title>{pageTitle}</title> -        <meta name="description" content={pageDescription} /> -      </Head> -      <div className={`${styles.article} ${styles['article--no-comments']}`}> -        <PostHeader -          title={intl.formatMessage({ -            defaultMessage: 'Page not found', -            description: '404Page: page title', -            id: 'OccTWi', -          })} -        /> -        <div className={styles.body}> -          <FormattedMessage -            defaultMessage="Sorry, it seems that the page your are looking for does not exist. If you think this path should work, feel free to <link>contact me</link> with the necessary information so that I can fix the problem." -            description="404Page: page body" -            id="ZWh78Y" -            values={{ -              link: (chunks: string) => ( -                <Link href="/contact/"> -                  <a>{chunks}</a> -                </Link> -              ), -            }} -          /> -        </div> -      </div> -    </> -  ); -}; - -Error404.getLayout = getLayout; - -export const getStaticProps: GetStaticProps = async ( -  context: GetStaticPropsContext -) => { -  const intl = await getIntlInstance(); -  const breadcrumbTitle = intl.formatMessage({ -    defaultMessage: 'Error 404', -    description: '404Page: breadcrumb item', -    id: 'ywkCsK', -  }); -  const { locale } = context; -  const translation = await loadTranslation(locale); - -  return { -    props: { -      breadcrumbTitle, -      locale, -      translation, -    }, -  }; -}; - -export default Error404; | 
