Skip to content

Commit

Permalink
fix: fix followed space list not returning correct space network (#365)
Browse files Browse the repository at this point in the history
* fix: fix followed space list not returning correct space network

* refactor: improve typing
  • Loading branch information
wa0x6e authored May 29, 2024
1 parent 24c1c26 commit e0d97fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/ui/src/networks/offchain/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ export function createApi(uri: string, networkId: NetworkID): NetworkApi {
}
});

return follows.map(follow => ({ ...follow, space: { ...follow.space, network: networkId } }));
return follows.map(follow => ({
...follow,
space: { ...follow.space, network: follow.network }
}));
}
};
}
1 change: 1 addition & 0 deletions apps/ui/src/networks/offchain/api/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export const USER_VOTES_QUERY = gql`
export const USER_FOLLOWS_QUERY = gql`
query ($follower: String!) {
follows(where: { follower: $follower }) {
network
space {
id
}
Expand Down
1 change: 1 addition & 0 deletions apps/ui/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export type Follow = {
follower: string;
space: Space;
created: number;
network: NetworkID;
};

export type Contact = {
Expand Down

0 comments on commit e0d97fe

Please sign in to comment.