Skip to content

Commit

Permalink
Update participating property name on Member.
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonfancher committed Nov 23, 2021
1 parent bac9fff commit 1da616e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/webapp/src/members/helpers/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const formatQueriedMemberDataAsMember = (
url: ipfsUrl(data.inductionVideo),
},
encryptionKey: undefined, // Include once exposed
participatingInNextElection: data.participating,
participatingInElection: data.participating,
delegateRank: undefined, // Include once exposed
representativeAccountName: undefined, // Include once exposed
};
Expand Down
4 changes: 2 additions & 2 deletions packages/webapp/src/members/hooks/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const useMembersWithAssets = () => {
return { members, isLoading, isError };
};

export const useMemberByAccountNameNew = (account: string) => {
export const useMemberByAccountNameAsMember = (account: string) => {
const result = useBoxQuery<MembersQuery>(`{
members(ge: "${account}", le: "${account}") {
edges {
Expand All @@ -134,5 +134,5 @@ export const useMemberByAccountNameNew = (account: string) => {

export const useCurrentMember = () => {
const [ualAccount] = useUALAccount();
return useMemberByAccountNameNew(ualAccount?.accountName);
return useMemberByAccountNameAsMember(ualAccount?.accountName);
};
2 changes: 1 addition & 1 deletion packages/webapp/src/members/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface Member {
// Member's participation status is updated once they lose a round (updated as soon as a new value is known),
// ie. a member's opt-in participation status lifetime is only from the start of Round 1
// until the end of the Round they lose (or end of the election)
participatingInNextElection: boolean;
participatingInElection: boolean;
delegateRank?: number; // Include once exposed
representativeAccountName?: string; // Include once exposed
}
Expand Down

0 comments on commit 1da616e

Please sign in to comment.