Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Add Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
harshraj8843 committed Jan 2, 2024
1 parent 824f003 commit 788375e
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 1 deletion.
56 changes: 56 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@codinasion/language-data": "workspace:*",
"@docsearch/css": "3",
"@docsearch/react": "3",
"@giscus/react": "^2",
"@tailwindcss/typography": "^0.5.10",
"daisyui": "^4.4.22",
"flowbite": "^2.2.0",
Expand Down
30 changes: 30 additions & 0 deletions website/src/components/Comment/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use client";

import { useTheme } from "next-themes";
import Giscus from "@giscus/react";

export default function Comment() {
const { theme } = useTheme();

return (
<>
<div className="my-10">
<Giscus
id="giscus-comments"
repo={`codinasion/.github`}
repoId={`R_kgDOKx7Kyw`}
category={`General`}
categoryId={`DIC_kwDOKx7Ky84CcJY2`}
mapping={`pathname`}
strict={`1`}
reactionsEnabled={`1`}
emitMetadata={`0`}
inputPosition={`bottom`}
theme={theme}
lang={`en`}
loading={`lazy`}
/>
</div>
</>
);
}
2 changes: 1 addition & 1 deletion website/src/components/Program/program-component.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Pagination from "@/components/Pagination";
import ProgramCard from "./program-card";
import ProgramLanguageComponent from "./program-language-component";
import SponsorCard from "../Sponsors/sponsor-card";
import SponsorCard from "@/components/Sponsors/sponsor-card";
import type { ProgramListType } from "@/types";

interface Props {
Expand Down
3 changes: 3 additions & 0 deletions website/src/components/Program/program-detail-component.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { GetLanguageData } from "@codinasion/language-data";
import MarkdownPreview from "@/components/MarkdownPreview";
import Comment from "@/components/Comment";
import ProgramContributorsComponent from "./program-contributors-component";
import SponsorCard from "@/components/Sponsors/sponsor-card";
import type { ProgramDataType } from "@/types";
Expand Down Expand Up @@ -36,6 +37,8 @@ ${programData.description}
${codeblock}
`}
</MarkdownPreview>

<Comment />
</div>

<div className="space-y-5 min-w-[320px]">
Expand Down

0 comments on commit 788375e

Please sign in to comment.