Fix(nav): Only update user data if current challenge actually changes
This commit is contained in:
@ -26,7 +26,8 @@ export function updateMyCurrentChallengeSaga(actions, getState) {
|
|||||||
.filter(() => {
|
.filter(() => {
|
||||||
const { app: { user: username } } = getState();
|
const { app: { user: username } } = getState();
|
||||||
return !!username;
|
return !!username;
|
||||||
});
|
})
|
||||||
|
.distinctUntilChanged();
|
||||||
const optimistic = updateChallenge$.map(id => {
|
const optimistic = updateChallenge$.map(id => {
|
||||||
const { app: { user: username } } = getState();
|
const { app: { user: username } } = getState();
|
||||||
return updateMyCurrentChallenge(username, id);
|
return updateMyCurrentChallenge(username, id);
|
||||||
|
Reference in New Issue
Block a user