mirror of
https://github.com/wassname/talk.git
synced 2026-10-04 13:10:23 +08:00
only refetch the comments if you're an admin
This commit is contained in:
1 parent
5dbeb695a4
commit
e4e2ff03b3
1 file changed
+2
-1
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user