aboutsummaryrefslogtreecommitdiff
path: root/components/disqus.tsx
blob: dca03e2222d7df50885439e5f5483fde36b8e87f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;