Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tu Huynh
committed
Feb 2, 2019
1 parent
3135d20
commit 21417aa
Showing
6 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import Disqus from "disqus-react"; | ||
|
||
const DisqusComponent = ({ guid, title }) => { | ||
if (typeof window !== "undefined") { | ||
const disqusConfig = { | ||
url : window.location.href, | ||
indentifier: guid, | ||
title : title, | ||
}; | ||
|
||
return ( | ||
<Disqus.DiscussionEmbed | ||
shortname="fptu-tech" | ||
config={disqusConfig} | ||
/> | ||
); | ||
} else { | ||
return null; | ||
} | ||
}; | ||
|
||
export default DisqusComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters