From 1da616efbdc3bb0e0354da7c11490eaa5751b13d Mon Sep 17 00:00:00 2001 From: Brandon Fancher Date: Mon, 22 Nov 2021 17:26:46 -0500 Subject: [PATCH] Update participating property name on Member. --- packages/webapp/src/members/helpers/formatters.ts | 2 +- packages/webapp/src/members/hooks/queries.ts | 4 ++-- packages/webapp/src/members/interfaces.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/webapp/src/members/helpers/formatters.ts b/packages/webapp/src/members/helpers/formatters.ts index 105f27839..423a91445 100644 --- a/packages/webapp/src/members/helpers/formatters.ts +++ b/packages/webapp/src/members/helpers/formatters.ts @@ -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 }; diff --git a/packages/webapp/src/members/hooks/queries.ts b/packages/webapp/src/members/hooks/queries.ts index caaa118a5..c2fd4dda8 100644 --- a/packages/webapp/src/members/hooks/queries.ts +++ b/packages/webapp/src/members/hooks/queries.ts @@ -114,7 +114,7 @@ export const useMembersWithAssets = () => { return { members, isLoading, isError }; }; -export const useMemberByAccountNameNew = (account: string) => { +export const useMemberByAccountNameAsMember = (account: string) => { const result = useBoxQuery(`{ members(ge: "${account}", le: "${account}") { edges { @@ -134,5 +134,5 @@ export const useMemberByAccountNameNew = (account: string) => { export const useCurrentMember = () => { const [ualAccount] = useUALAccount(); - return useMemberByAccountNameNew(ualAccount?.accountName); + return useMemberByAccountNameAsMember(ualAccount?.accountName); }; diff --git a/packages/webapp/src/members/interfaces.ts b/packages/webapp/src/members/interfaces.ts index 520bdb4ba..6a76c5ff2 100644 --- a/packages/webapp/src/members/interfaces.ts +++ b/packages/webapp/src/members/interfaces.ts @@ -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 }