Skip to content

Commit cfb0034

Browse files
committed
add post url
1 parent 0210e2b commit cfb0034

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/DiscourseComment/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ export default function DiscourseComment(props) {
44
// Get the current page URL
55
// const url = window.location.href;
66
// eslint-disable-next-line react/prop-types
7-
// const { topicId } = props;
7+
const { postUrl } = props;
88
useEffect(() => {
99
window.DiscourseEmbed = {
1010
discourseUrl: "https://web3auth.io/community/",
11-
discourseEmbedUrl: `${window.location.href}`,
11+
discourseEmbedUrl: postUrl,
1212
};
1313

1414
const d = document.createElement("script");

src/theme/MDXPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default function MDXPage(props: ComponentProps<typeof OriginalMDXPage>) {
167167
)}
168168
</BrowserOnly>
169169
</div>
170-
<DiscourseComment />
170+
<DiscourseComment postUrl={url} />
171171
</div>
172172
{MDXPageContent.toc && (
173173
<div className="col col--3" style={{ paddingRight: "30px" }}>

0 commit comments

Comments
 (0)