Skip to content

Commit

Permalink
Refactor DisqusLoader component to use current page URL for Disqus co…
Browse files Browse the repository at this point in the history
…nfiguration
  • Loading branch information
hasanshahriar32 committed Oct 13, 2024
1 parent af58b92 commit b2dc3bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/pages/project/DisqusLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
import { DiscussionEmbed } from 'disqus-react'
import React from 'react';
const DisqusLoader = ({data}:any) => {
const pageURL = typeof window !== 'undefined' ? window.location.href : ''
return (
<div className='mt-12'>
<div className="mt-12">
<DiscussionEmbed
shortname="ece21"
config={{
url: data?.site,
url: pageURL,
identifier: data?.slug,
title: data?.title,
language: 'en_US', //e.g. for Traditional Chinese (Taiwan)
Expand Down

0 comments on commit b2dc3bb

Please sign in to comment.