1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-04-21 12:05:30 -04:00

next-mdx-remote v4 (#737)

This commit is contained in:
2022-01-18 09:25:09 -05:00
committed by GitHub
parent 2ef5d06c38
commit a406010bd2
110 changed files with 1009 additions and 1490 deletions
+29
View File
@@ -0,0 +1,29 @@
import { useTheme } from "next-themes";
import { Giscus } from "@giscus/react";
import { giscusConfig } from "../../lib/config";
import type { GiscusProps } from "@giscus/react";
import styles from "./Comments.module.css";
type Props = {
title: string;
};
const Comments = ({ title }: Props) => {
const { resolvedTheme } = useTheme();
return (
<div className={styles.wrapper}>
<Giscus
{...(giscusConfig as GiscusProps)}
term={title}
mapping="specific"
reactionsEnabled="1"
emitMetadata="0"
theme={resolvedTheme === "dark" ? "dark" : "light"}
/>
</div>
);
};
export default Comments;