Skip to content

Commit

Permalink
Merge pull request #2719 from daostack/CW-some-stream-disappear
Browse files Browse the repository at this point in the history
Some streams disappear when clicking subspace stream
  • Loading branch information
MeyerPV authored Aug 27, 2024
2 parents d4d5306 + 7bc0954 commit c4a2fb7
Show file tree
Hide file tree
Showing 9 changed files with 530 additions and 449 deletions.
3 changes: 2 additions & 1 deletion src/pages/OldCommon/hooks/useCommonMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const useCommonMember = (options: Options = {}): Return => {
loading: false,
fetched: true,
data: {
commonId,
...commonMember,
...generateCirclesDataForCommonMember(
governance.circles,
Expand Down Expand Up @@ -189,7 +190,7 @@ export const useCommonMember = (options: Options = {}): Return => {
}
}
},
[state, userId],
[state, userId, commonId],
);

const setCommonMember = useCallback(
Expand Down
6 changes: 3 additions & 3 deletions src/pages/OldCommon/hooks/useCommonMembers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const useCommonMembers = ({ commonId }: Options): Return => {

const user = cachedUserStates[commonMember.userId]?.data;

return user ? [...acc, { ...commonMember, user }] : acc;
return user ? [...acc, { ...commonMember, user, commonId }] : acc;
}, []);

return {
Expand Down Expand Up @@ -178,7 +178,7 @@ export const useCommonMembers = ({ commonId }: Options): Return => {
({ uid }) => uid === commonMember.userId,
);

return user ? [...acc, { ...commonMember, user }] : acc;
return user ? [...acc, { ...commonMember, user, commonId }] : acc;
}, []);

return {
Expand All @@ -198,7 +198,7 @@ export const useCommonMembers = ({ commonId }: Options): Return => {
}));
}
})();
}, [commonMembersState.data]);
}, [commonMembersState.data, commonId]);

return {
...state,
Expand Down
Loading

0 comments on commit c4a2fb7

Please sign in to comment.