From 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 29 Apr 2022 12:13:34 +0200 Subject: 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. --- src/pages/index.tsx | 241 ---------------------------------------------------- 1 file changed, 241 deletions(-) delete mode 100644 src/pages/index.tsx (limited to 'src/pages/index.tsx') diff --git a/src/pages/index.tsx b/src/pages/index.tsx deleted file mode 100644 index ca0a809..0000000 --- a/src/pages/index.tsx +++ /dev/null @@ -1,241 +0,0 @@ -import FeedIcon from '@assets/images/icon-feed.svg'; -import { ButtonLink } from '@components/Buttons'; -import { ContactIcon } from '@components/Icons'; -import Layout from '@components/Layouts/Layout'; -import { ResponsiveImage } from '@components/MDX'; -import { RecentPosts } from '@components/Widgets'; -import HomePageContent from '@content/pages/homepage.mdx'; -import { getPublishedPosts } from '@services/graphql/queries'; -import styles from '@styles/pages/Home.module.scss'; -import { NextPageWithLayout, ResponsiveImageProps } from '@ts/types/app'; -import { PostsList } from '@ts/types/blog'; -import { settings } from '@utils/config'; -import { loadTranslation } from '@utils/helpers/i18n'; -import { NestedMDXComponents } from 'mdx/types'; -import { GetStaticProps, GetStaticPropsContext } from 'next'; -import Head from 'next/head'; -import Script from 'next/script'; -import type { ReactElement } from 'react'; -import { useIntl } from 'react-intl'; -import { Graph, WebPage } from 'schema-dts'; - -type HomePageProps = { - recentPosts: PostsList; -}; - -const Home: NextPageWithLayout = ({ - recentPosts, -}: { - recentPosts: PostsList; -}) => { - const intl = useIntl(); - - const CodingLinks = () => { - return ( - - ); - }; - - const ColdarkRepos = () => { - return ( - - ); - }; - - const LibreLinks = () => { - return ( - - ); - }; - - const ShaarliLink = () => { - return ( - - ); - }; - - const MoreLinks = () => { - return ( - - ); - }; - - const getRecentPosts = () => { - return ; - }; - - const components: NestedMDXComponents = { - CodingLinks: CodingLinks, - ColdarkRepos: ColdarkRepos, - Image: (props: ResponsiveImageProps) => ResponsiveImage({ ...props }), - LibreLinks: LibreLinks, - MoreLinks: MoreLinks, - RecentPosts: getRecentPosts, - ShaarliLink: ShaarliLink, - }; - - const pageTitle = intl.formatMessage( - { - defaultMessage: '{websiteName} | Front-end developer: WordPress/React', - description: 'HomePage: SEO - Page title', - id: 'PXp2hv', - }, - { websiteName: settings.name } - ); - const pageDescription = intl.formatMessage( - { - defaultMessage: - '{websiteName} is a front-end developer located in France. He codes and he writes mostly about web development and open-source.', - description: 'HomePage: SEO - Meta description', - id: 'tMuNTy', - }, - { websiteName: settings.name } - ); - - const webpageSchema: WebPage = { - '@id': `${settings.url}/#home`, - '@type': 'WebPage', - name: pageTitle, - description: pageDescription, - author: { '@id': `${settings.url}/#branding` }, - creator: { '@id': `${settings.url}/#branding` }, - editor: { '@id': `${settings.url}/#branding` }, - inLanguage: settings.locales.defaultLocale, - license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', - reviewedBy: { '@id': `${settings.url}/#branding` }, - url: `${settings.url}`, - }; - - const schemaJsonLd: Graph = { - '@context': 'https://schema.org', - '@graph': [webpageSchema], - }; - - return ( - <> - - {pageTitle} - - - - - - -