diff --git a/components/Pre.js b/components/Pre.tsx
similarity index 92%
rename from components/Pre.js
rename to components/Pre.tsx
index f2df539..8cf91bc 100644
--- a/components/Pre.js
+++ b/components/Pre.tsx
@@ -1,6 +1,10 @@
-import { useState, useRef } from 'react'
+import { useState, useRef, ReactNode } from 'react'
-const Pre = (props) => {
+interface Props {
+ children: ReactNode
+}
+
+const Pre = ({ children }: Props) => {
const textInput = useRef(null)
const [hovered, setHovered] = useState(false)
const [copied, setCopied] = useState(false)
@@ -63,7 +67,7 @@ const Pre = (props) => {
)}
-
{props.children}
+
{children}
)
}
diff --git a/components/SEO.js b/components/SEO.tsx
similarity index 82%
rename from components/SEO.js
rename to components/SEO.tsx
index 0d1dac0..9bea68f 100644
--- a/components/SEO.js
+++ b/components/SEO.tsx
@@ -1,8 +1,31 @@
import Head from 'next/head'
import { useRouter } from 'next/router'
import siteMetadata from '@/data/siteMetadata'
+import { AuthorFrontMatter } from 'types/AuthorFrontMatter'
+import { PostFrontMatter } from 'types/PostFrontMatter'
-const CommonSEO = ({ title, description, ogType, ogImage, twImage, canonicalUrl }) => {
+interface CommonSEOProps {
+ title: string
+ description: string
+ ogType: string
+ ogImage:
+ | string
+ | {
+ '@type': string
+ url: string
+ }[]
+ twImage: string
+ canonicalUrl?: string
+}
+
+const CommonSEO = ({
+ title,
+ description,
+ ogType,
+ ogImage,
+ twImage,
+ canonicalUrl,
+}: CommonSEOProps) => {
const router = useRouter()
return (
@@ -14,7 +37,7 @@ const CommonSEO = ({ title, description, ogType, ogImage, twImage, canonicalUrl