From e58b955496163adaa1a0aa5e0e600dda881ba1ab Mon Sep 17 00:00:00 2001 From: nc Date: Sun, 19 Feb 2023 19:39:06 +0700 Subject: [PATCH] type lint fix --- src/components/Seo/index.tsx | 43 +++++ src/pages/Layout/index.tsx | 45 ++--- src/pages/Layout/isso.css | 340 ----------------------------------- src/pages/about/index.tsx | 12 +- src/pages/index.tsx | 34 +++- 5 files changed, 108 insertions(+), 366 deletions(-) create mode 100644 src/components/Seo/index.tsx delete mode 100644 src/pages/Layout/isso.css diff --git a/src/components/Seo/index.tsx b/src/components/Seo/index.tsx new file mode 100644 index 0000000..374df43 --- /dev/null +++ b/src/components/Seo/index.tsx @@ -0,0 +1,43 @@ +import React, { FC } from "react" +import PropTypes from "prop-types" +import { useStaticQuery, graphql } from "gatsby" + +interface seoType { + description: string, + title : string, + children: React.ReactNode; +} + +const SEO: FC = (props) => { + const { site } = useStaticQuery( + graphql` + query { + site { + siteMetadata { + title + description + author + } + } + } + ` + ) + + const metaDescription = props.description || site.siteMetadata.description + + return ( + <> + + {props.title} + + + + + + + {props.children} + + ) +} + +export default SEO \ No newline at end of file diff --git a/src/pages/Layout/index.tsx b/src/pages/Layout/index.tsx index e5a2c65..735265c 100644 --- a/src/pages/Layout/index.tsx +++ b/src/pages/Layout/index.tsx @@ -1,36 +1,31 @@ import React from "react"; -import { graphql, Script } from "gatsby"; +import { graphql, HeadProps, PageProps, Script } from "gatsby"; import config from '../../../data/site-config'; import Base from "../../components/Base"; -import SEO from "../../components/seo"; +import SEO from "../../components/Seo"; +import Comment from "../../components/Comment" import { MDXProvider } from '@mdx-js/react'; import './styles.scss'; -import './isso.css'; -const Comment = ({post_id}) => { - return ( - <> -