diff --git a/src/proposals/components/VoteLine.tsx b/src/proposals/components/VoteLine.tsx index fd69a1db..4784ba5f 100644 --- a/src/proposals/components/VoteLine.tsx +++ b/src/proposals/components/VoteLine.tsx @@ -13,18 +13,19 @@ export function VoteLine({ }: VoteLineProps) { return ( ({ display: 'inline-flex', alignItems: 'center', position: 'relative', - height: 11, + height: 8, width: width, backgroundColor: '$mainLight', borderColor: `${theme.palette.$mainElements} !important`, borderStyle: 'solid', borderWidth: '1px', - borderTopWidth: 3, - borderRightWidth: 3, + borderTopWidth: 2, + borderRightWidth: 2, [theme.breakpoints.up('lg')]: { height: 10, borderTopWidth: 3, diff --git a/src/proposals/components/proposal/ProposalPage.tsx b/src/proposals/components/proposal/ProposalPage.tsx index 64fd41d1..c30ad767 100644 --- a/src/proposals/components/proposal/ProposalPage.tsx +++ b/src/proposals/components/proposal/ProposalPage.tsx @@ -80,6 +80,14 @@ export function ProposalPage({ useEffect(() => { const { forVotes, againstVotes } = formatProposal(proposalData.proposal); + const { isVotingActive } = getProposalStepsAndAmounts({ + proposalData: proposal.data, + quorum: proposal.config.quorum, + differential: proposal.config.differential, + precisionDivider: proposal.precisionDivider, + cooldownPeriod: proposal.timings.cooldownPeriod, + executionPayloadTime: proposal.timings.executionPayloadTime, + }); const startBlock = proposalData.proposal.data.votingMachineData.createdBlock; @@ -89,12 +97,6 @@ export function ProposalPage({ const totalVotes = forVotes + againstVotes; - const isFinished = - proposalData.proposal.state === ProposalState.Executed || - proposalData.proposal.state === ProposalState.Defeated || - proposalData.proposal.state === ProposalState.Canceled || - proposalData.proposal.state === ProposalState.Expired; - if (startBlock > 0) { if (totalVotes > 0 && !proposal.data.prerender) { getVoters( @@ -106,7 +108,7 @@ export function ProposalPage({ ); } - if (!isFinished) { + if (!isVotingActive) { startVotersPolling( proposal.data.id, proposal.data.votingChainId, diff --git a/src/proposals/components/proposalList/ActiveProposalListItem.tsx b/src/proposals/components/proposalList/ActiveProposalListItem.tsx index fd31f789..f9d950a8 100644 --- a/src/proposals/components/proposalList/ActiveProposalListItem.tsx +++ b/src/proposals/components/proposalList/ActiveProposalListItem.tsx @@ -124,6 +124,13 @@ export function ActiveProposalListItem({ if (!isForHelpModal) { setIsClicked(true); } + }} + sx={{ + '&:visited': { + '.VoteLine': { + borderColor: `${theme.palette.$mainElements} !important`, + }, + }, }}>