Upgrade to React 18

This commit is contained in:
Defectink
2022-04-22 15:25:03 +08:00
parent bdd56b52d0
commit 2b001973a7
12 changed files with 18 additions and 22 deletions

View File

@ -1,10 +1,9 @@
import { FC } from 'react';
import Giscus from '@giscus/react';
import { useTheme } from 'next-themes';
import useInView from 'lib/hooks/useInView';
import Image from 'next/image';
const PostComment: FC = () => {
const PostComment = () => {
const { systemTheme, theme } = useTheme();
const currentTheme = theme === 'system' ? systemTheme : theme;

View File

@ -1,4 +1,3 @@
import { FC } from 'react';
import { getHeadings } from 'lib/utils';
import Anchor from 'components/mdx/Anchor';
@ -6,7 +5,7 @@ interface Props {
headings: ReturnType<typeof getHeadings>;
}
const PostTOC: FC<Props> = ({ headings }) => {
const PostTOC = ({ headings }: Props) => {
return (
<>
<h2>What&apos;s inside?</h2>