Skip to content

Commit cf46bac

Browse files
committed
Removed dynamic import and toString, renamed component
1 parent 6f61b66 commit cf46bac

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

components/ListItem.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export default function ListItem({ i }) {
4949
shortname='youknowwhatblog'
5050
config={
5151
{
52-
url: `${process.env.NEXT_PUBLIC_PROD_HOST}/articles/${i.id.toString()}`,
53-
identifier: i.id.toString(),
54-
title: i.title.toString(),
52+
url: `${process.env.NEXT_PUBLIC_PROD_HOST}/articles/${i.id}`,
53+
identifier: i.id,
54+
title: i.title,
5555
}
5656
}
5757
>

components/article/Comments.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import styled from 'styled-components'
22
import { DiscussionEmbed } from 'disqus-react'
33

4-
export default function DisqusComments({ params }) {
4+
export default function Comments({ params }) {
55
return (
66
<Footer>
77
<DiscussionEmbed
88
shortname='youknowwhatblog'
99
config={
1010
{
11-
url: `${process.env.NEXT_PUBLIC_PROD_HOST}/articles/${params.id.toString()}`,
12-
identifier: params.id.toString(),
13-
title: params.title.toString(),
11+
url: `${process.env.NEXT_PUBLIC_PROD_HOST}/articles/${params.id}`,
12+
identifier: params.id,
13+
title: params.title,
1414
language: 'en_GB'
1515
}
1616
}

pages/articles/[id].js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import useSWR from 'swr'
22
import styled from 'styled-components'
33
import Head from 'next/head'
4-
import dynamic from 'next/dynamic'
54

65
import Markdown from '../../components/article/Markdown'
76
import SocialButtons from '../../components/article/SocialButtons'
8-
const Comments = dynamic(() => import('../../components/article/Comments'))
7+
import Comments from '../../components/article/Comments'
98

109
const fetcher = url => fetch(url).then(r => r.json())
1110

0 commit comments

Comments
 (0)