File tree Expand file tree Collapse file tree 6 files changed +8264
-40
lines changed Expand file tree Collapse file tree 6 files changed +8264
-40
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import Chip from '@material-ui/core/Chip'
33import styled from 'styled-components'
44import { useState , useEffect } from 'react'
55import Image from 'next/image'
6+ import { CommentCount } from 'disqus-react'
67
78export default function ListItem ( { i } ) {
89 const [ isCategories , setIsCategories ] = useState ( true )
@@ -44,11 +45,19 @@ export default function ListItem({ i }) {
4445 ) }
4546 < div >
4647 < span >
47- < span
48- className = "fb-comments-count"
49- data-href = { `${ process . env . NEXT_PUBLIC_PROD_HOST } /articles/${ i . id } ` }
50- > </ span >
51- comment(s)
48+ < CommentCount
49+ shortname = 'youknowwhatblog'
50+ config = {
51+ {
52+ url : `${ process . env . NEXT_PUBLIC_PROD_HOST } /articles/${ i . id . toString ( ) } ` ,
53+ identifier : i . id . toString ( ) ,
54+ title : i . title . toString ( ) ,
55+ }
56+ }
57+ >
58+ { /* Placeholder Text */ }
59+ Comments
60+ </ CommentCount >
5261 </ span >
5362 < time dateTime = { `${ i . published_at . slice ( 0 , 10 ) } ` } >
5463 { new Date ( i . published_at ) . toDateString ( ) . slice ( 4 ) }
Original file line number Diff line number Diff line change 11import styled from 'styled-components'
2- import { useEffect , useContext } from 'react'
3- import Context from '../../context'
2+ import { DiscussionEmbed } from 'disqus-react'
43
54export default function DisqusComments ( { params } ) {
6- const { isDarkModeOn } = useContext ( Context )
7-
8- useEffect ( ( ) => {
9- window . FB . XFBML . parse ( )
10- } )
11-
125 return (
136 < Footer >
14- < div
15- className = 'fb-comments'
16- data-href = { `${ process . env . NEXT_PUBLIC_PROD_HOST } /articles/${ params . id } ` }
17- data-numposts = '10'
18- data-width = '100%'
19- data-colorscheme = { `${ isDarkModeOn ? 'dark' : 'light' } ` }
20- data-lazy = { true }
21- > </ div >
7+ < DiscussionEmbed
8+ shortname = 'youknowwhatblog'
9+ config = {
10+ {
11+ url : `${ process . env . NEXT_PUBLIC_PROD_HOST } /articles/${ params . id . toString ( ) } ` ,
12+ identifier : params . id . toString ( ) ,
13+ title : params . title . toString ( ) ,
14+ language : 'en_GB'
15+ }
16+ }
17+ />
2218 </ Footer >
2319 )
2420}
You can’t perform that action at this time.
0 commit comments