aboutsummaryrefslogtreecommitdiff
path: root/components/disqus.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/disqus.tsx')
-rw-r--r--components/disqus.tsx26
1 files changed, 26 insertions, 0 deletions
diff --git a/components/disqus.tsx b/components/disqus.tsx
new file mode 100644
index 0000000..dca03e2
--- /dev/null
+++ b/components/disqus.tsx
@@ -0,0 +1,26 @@
+import { DiscussionEmbed } from "disqus-react";
+
+type DisqusCommentsProps = {
+ post: {
+ name: string;
+ url: string;
+ title: string;
+ episode: number;
+ };
+};
+
+const DisqusComments = ({ post }: DisqusCommentsProps) => {
+ const disqusShortname = post.name || "your_disqus_shortname";
+ const disqusConfig = {
+ url: post.url,
+ identifier: post.url, // Single post id
+ title: `${post.title} - Episode ${post.episode}`, // Single post title
+ };
+
+ return (
+ <div>
+ <DiscussionEmbed shortname={disqusShortname} config={disqusConfig} />
+ </div>
+ );
+};
+export default DisqusComments;