From 9b4ce7db6c2a819ec4cbbf6d665d58a63f6f339f Mon Sep 17 00:00:00 2001 From: Jimin Kim Date: Fri, 19 Jan 2024 13:45:49 +0900 Subject: [PATCH] refactor: JSX to TSX --- src/theme/BlogPostItem/{index.js => index.tsx} | 3 ++- src/theme/DocItem/{index.js => index.tsx} | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) rename src/theme/BlogPostItem/{index.js => index.tsx} (86%) rename src/theme/DocItem/{index.js => index.tsx} (87%) diff --git a/src/theme/BlogPostItem/index.js b/src/theme/BlogPostItem/index.tsx similarity index 86% rename from src/theme/BlogPostItem/index.js rename to src/theme/BlogPostItem/index.tsx index 2c48a8f..03b3f42 100644 --- a/src/theme/BlogPostItem/index.js +++ b/src/theme/BlogPostItem/index.tsx @@ -2,8 +2,9 @@ import React from 'react'; import BlogPostItem from '@theme-original/BlogPostItem'; import {useBlogPost} from '@docusaurus/theme-common/internal'; import Giscus from '@giscus/react'; +import type {Props} from '@theme/BlogPostItem'; -export default function BlogPostItemWrapper(props) { +export default function BlogPostItemWrapper(props: Props): JSX.Element { const {isBlogPostPage} = useBlogPost(); return ( diff --git a/src/theme/DocItem/index.js b/src/theme/DocItem/index.tsx similarity index 87% rename from src/theme/DocItem/index.js rename to src/theme/DocItem/index.tsx index 938bc8d..9fc03aa 100644 --- a/src/theme/DocItem/index.js +++ b/src/theme/DocItem/index.tsx @@ -2,10 +2,11 @@ import React from 'react'; import clsx from 'clsx'; import DocItem from '@theme-original/DocItem'; import Giscus from '@giscus/react'; +import type {Props} from '@theme/DocItem'; import styles from '@docusaurus/theme-classic/src/theme/DocItem/Layout/styles.module.css'; -export default function DocItemWrapper(props) { +export default function DocItemWrapper(props: Props): JSX.Element { return ( <>