From e4e2ff03b3f00c76e29f2a4998bd2d198294e77f Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Wed, 5 Apr 2017 14:41:06 -0600 Subject: [PATCH] only refetch the comments if you're an admin --- client/coral-embed-stream/src/Embed.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index 3f3c395f8..c393df6f0 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -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(); }