fixed unfollow user and topics

This commit is contained in:
Leon Liang
2019-12-06 02:17:52 -05:00
parent a1f9a4bef3
commit 39613584e7
2 changed files with 64 additions and 50 deletions

View File

@@ -93,7 +93,8 @@ class user extends Component {
.then(res => {
console.log("removed sub");
this.setState({
following: false
following: false,
myTopics: []
});
})
.catch(function(err) {
@@ -201,9 +202,8 @@ class user extends Component {
} else {
alertPromise = new Promise((resolve, reject) => {
resolve();
})
});
}
Promise.all([otherUserPromise, userPromise, posts, alertPromise])
.then(() => {