From 6bfbd1abafd665c45b8f21725163081d51a108df Mon Sep 17 00:00:00 2001 From: jordan Date: Sun, 16 Jun 2024 13:35:04 -0700 Subject: [PATCH 1/2] range peeking to voting time only, change copy --- src/components/voting/VoteResultsPanel.tsx | 6 +++++- src/constants/addresses.ts | 2 +- src/pages/Vote.tsx | 24 +++++++++++++--------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/components/voting/VoteResultsPanel.tsx b/src/components/voting/VoteResultsPanel.tsx index 5ed15629..40dd6dd8 100644 --- a/src/components/voting/VoteResultsPanel.tsx +++ b/src/components/voting/VoteResultsPanel.tsx @@ -100,7 +100,11 @@ export const VoteResultsPanel = ({ )} - {hasUserVoted ? 'Your vote has been submitted!' : 'Voting is Complete!'} + {hasUserVoted + ? 'Your vote has been submitted!' + : isPeeking + ? 'Voting Results so far' + : 'Voting is Complete!'} {hasUserVoted && ( diff --git a/src/constants/addresses.ts b/src/constants/addresses.ts index 8c317ede..db204c18 100644 --- a/src/constants/addresses.ts +++ b/src/constants/addresses.ts @@ -8,7 +8,7 @@ export const ADDR_TESTNET: Record = { GM_FACTORY: '0x14e32E7893D6A1fA5f852d8B2fE8c57A2aB670ba', GS_FACTORY: '0x8D994BEef251e30C858e44eCE3670feb998CA77a', HATS_POSTER: '0x4F0dc1C7d91d914d921F3C9C188F4454AE260317', - VOTE_CONTEST: '0x3d06D95026696826B507D25cfBb86E4457F34eC5', + VOTE_CONTEST: '0xB60D9C91aBcA9d32a2a543BDFF958Db2d7DFb816', } as const; export const ADDR_PROD: Record = { diff --git a/src/pages/Vote.tsx b/src/pages/Vote.tsx index e460a233..dd1f9c6f 100644 --- a/src/pages/Vote.tsx +++ b/src/pages/Vote.tsx @@ -153,6 +153,8 @@ const VotingOpen = ({ validateInputOnBlur: true, }); + const { votingStage } = useVoting(); + const [step, setStep] = useState(0); const [modalOpen, setModalOpen] = useState(false); @@ -205,16 +207,18 @@ const VotingOpen = ({ - - setSeeResults(true)} - > - - - + {votingStage === VotingStage.Active && ( + + setSeeResults(true)} + > + + + + )}