diff --git a/src/components/seo.js b/src/components/seo.js deleted file mode 100644 index 1bc3cfe..0000000 --- a/src/components/seo.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * SEO component that queries for data with - * Gatsby's useStaticQuery React hook - * - * See: https://www.gatsbyjs.org/docs/use-static-query/ - */ - -import React from 'react' -import PropTypes from 'prop-types' -import { Helmet } from 'react-helmet' -import { useStaticQuery, graphql } from 'gatsby' - -function SEO ({ description, lang, meta, title }) { - const { site } = useStaticQuery( - graphql` - query { - site { - siteMetadata { - title - description - author - } - } - } - ` - ) - - const metaDescription = description || site.siteMetadata.description - - return ( - - ) -} - -SEO.defaultProps = { - lang: 'en', - meta: [], - description: '' -} - -SEO.propTypes = { - description: PropTypes.string, - lang: PropTypes.string, - meta: PropTypes.arrayOf(PropTypes.object), - title: PropTypes.string.isRequired -} - -export default SEO diff --git a/src/pages/404.js b/src/pages/404.js index 30df068..733d5c3 100644 --- a/src/pages/404.js +++ b/src/pages/404.js @@ -1,11 +1,9 @@ import React from 'react' import Layout from '../components/layout' -import Seo from '../components/seo' const NotFoundPage = () => ( -

NOT FOUND

You just hit a route that doesn't exist... the sadness.

diff --git a/src/pages/page-2.js b/src/pages/page-2.js deleted file mode 100644 index 55eda8b..0000000 --- a/src/pages/page-2.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react' -import { Link } from 'gatsby' - -import Layout from '../components/layout' -import Seo from '../components/seo' - -const SecondPage = () => ( - - -

Hi from the second page

-

Welcome to page 2

- Go back to the homepage -
-) - -export default SecondPage diff --git a/src/pages/using-typescript.tsx b/src/pages/using-typescript.tsx deleted file mode 100644 index f9212ca..0000000 --- a/src/pages/using-typescript.tsx +++ /dev/null @@ -1,34 +0,0 @@ -// If you don't want to use TypeScript you can delete this file! -import React from "react" -import { PageProps, Link, graphql } from "gatsby" - -import Layout from "../components/layout" -import SEO from "../components/seo" - -type DataProps = { - site: { - buildTime: string - } -} - -const UsingTypescript: React.FC> = ({ data, path }) => ( - - -

Gatsby supports TypeScript by default!

-

This means that you can create and write .ts/.tsx files for your pages, components etc. Please note that the gatsby-*.js files (like gatsby-node.js) currently don't support TypeScript yet.

-

For type checking you'll want to install typescript via npm and run tsc --init to create a .tsconfig file.

-

You're currently on the page "{path}" which was built on {data.site.buildTime}.

-

To learn more, head over to our documentation about TypeScript.

- Go back to the homepage -
-) - -export default UsingTypescript - -export const query = graphql` - { - site { - buildTime(formatString: "YYYY-MM-DD hh:mm a z") - } - } -`