import React, { useMemo, useState } from 'react'; import siteMetadata from '@/data/siteMetadata'; import { PostFrontMatter } from 'types/PostFrontMatter'; import { ReactCusdis } from 'react-cusdis'; import { useTheme } from 'next-themes'; interface Props { frontMatter: PostFrontMatter; } const Cusdis = ({ frontMatter }: Props) => { const { resolvedTheme } = useTheme(); const commentsTheme = useMemo(() => { switch (resolvedTheme) { case 'light': case 'dark': return resolvedTheme; default: return 'auto'; } }, [resolvedTheme]); return (