"use client"; import Giscus from "@giscus/react"; import clsx from "clsx"; import useTheme from "../../hooks/useTheme"; import config from "../../lib/config"; import type { ComponentPropsWithoutRef } from "react"; import type { GiscusProps } from "@giscus/react"; import styles from "./Comments.module.css"; export type CommentsProps = ComponentPropsWithoutRef<"div"> & { title: string; }; const Comments = ({ title, className, ...rest }: CommentsProps) => { const { theme } = useTheme(); // fail silently if giscus isn't configured if (!config.giscusConfig) { console.warn("Giscus isn't configured in lib/config/index.js."); return null; } // TODO: use custom `` spinner component during suspense return (
); }; export default Comments;