Skip to content

Commit

Permalink
Fix disqus args
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeraze committed Nov 19, 2022
1 parent 6babc33 commit 8cbd304
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions components/NotionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,17 @@ export const NotionPage: React.FC<types.PageProps> = ({
)

const footer = React.useMemo(() => <Footer />, [])
const canonicalPageUrl =
!config.isDev && getCanonicalPageUrl(site, recordMap)(pageId)
const title = getBlockTitle(block, recordMap) || site.name

const disqus = React.useMemo(() => <DiscussionEmbed
shortname='yerazesdomain'
config={ {
url: canonicalPageUrl,
title: title
} }
/>, [canonicalPageUrl, title])

if (router.isFallback) {
return <Loading />
Expand All @@ -213,7 +224,6 @@ export const NotionPage: React.FC<types.PageProps> = ({
return <Page404 site={site} pageId={pageId} error={error} />
}

const title = getBlockTitle(block, recordMap) || site.name

console.log('notion page', {
isDev: config.isDev,
Expand All @@ -231,8 +241,7 @@ export const NotionPage: React.FC<types.PageProps> = ({
g.block = block
}

const canonicalPageUrl =
!config.isDev && getCanonicalPageUrl(site, recordMap)(pageId)


const socialImage = mapImageUrl(
getPageProperty<string>('Social Image', block, recordMap) ||
Expand All @@ -245,16 +254,7 @@ export const NotionPage: React.FC<types.PageProps> = ({
getPageProperty<string>('Description', block, recordMap) ||
config.description

const disqus = <DiscussionEmbed
className='disqusComments'
shortname='yerazesdomain'
config={
{
url: {canonicalPageUrl},
title: {title}
}
}
/>


return (
<>
Expand Down

0 comments on commit 8cbd304

Please sign in to comment.