Merge pull request #466 from coralproject/stream-refetch-tweak

only refetch the comments if you're an admin
This commit is contained in:
David Erwin
2017-04-06 10:13:46 -04:00
committed by GitHub
+2 -1
View File
@@ -41,9 +41,10 @@ class Embed extends Component {
state = {activeTab: 0, showSignInDialog: false, activeReplyBox: ''};
changeTab = (tab) => {
const {isAdmin} = this.props.auth;
// Everytime the comes from another tab, the Stream needs to be updated.
if (tab === 0) {
if (tab === 0 && isAdmin) {
this.props.data.refetch();
}