From 98da25611752cd2ef8a2a0f25643e30bb9bcbe19 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Wed, 20 Mar 2024 00:31:45 -0400 Subject: [PATCH] run lint/pretty --- .../Activity/ActivityDescription.tsx | 2 +- .../ActivityDescriptionGovernance.tsx | 5 +++- src/components/ui/badges/Badge.tsx | 22 ++++++++-------- src/components/ui/badges/QuorumBadge.tsx | 26 +++++++------------ src/components/ui/proposal/Markdown.tsx | 2 +- 5 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/components/Activity/ActivityDescription.tsx b/src/components/Activity/ActivityDescription.tsx index fe6b7a8a47..1bd55ec499 100644 --- a/src/components/Activity/ActivityDescription.tsx +++ b/src/components/Activity/ActivityDescription.tsx @@ -49,7 +49,7 @@ export function ActivityDescription({ activity, showFullDescription }: IActivity alignItems="center" color="#B3B3B3" textStyle="text-md-sans-regular" - > + > - + {formatId((activity as GovernanceActivity).proposalId)} {metaData.title ? {metaData.title} : null} diff --git a/src/components/ui/badges/Badge.tsx b/src/components/ui/badges/Badge.tsx index a02e0cc3a9..a9226977f0 100644 --- a/src/components/ui/badges/Badge.tsx +++ b/src/components/ui/badges/Badge.tsx @@ -22,19 +22,19 @@ const redMinus2 = '#640E0D'; const redHover = '#76110F'; const sandBG = '#C18D5A'; -const sandHover = '#B97F46' -const blackText = '#150D04' +const sandHover = '#B97F46'; +const blackText = '#150D04'; -const grayBG = '#9A979D' -const grayHover = '#8C8990' +const grayBG = '#9A979D'; +const grayHover = '#8C8990'; -const lightBlueBG = '#A3B9EC' -const lightBlueHover = '#8DA8E7' -const darkBlueText = '#0A1E3D' +const lightBlueBG = '#A3B9EC'; +const lightBlueHover = '#8DA8E7'; +const darkBlueText = '#0A1E3D'; -const darkBlueBG = '#1B3B83' -const darkBlueHover = '#17326E' -const lightBlueText = '#D1DCF5' +const darkBlueBG = '#1B3B83'; +const darkBlueHover = '#17326E'; +const lightBlueText = '#D1DCF5'; const BADGE_MAPPING: BadgeType = { [FractalProposalState.ACTIVE]: { @@ -115,7 +115,7 @@ const BADGE_MAPPING: BadgeType = { textColor: darkBlueText, _hover: { bg: lightBlueHover }, }, - ownerApproved: { bg: 'sand.700', textColor: 'grayscale.black', _hover: { bg: 'sand.600' }, }, + ownerApproved: { bg: 'sand.700', textColor: 'grayscale.black', _hover: { bg: 'sand.600' } }, }; type BadgeSize = { [key: string]: { minWidth: string; height: string } }; diff --git a/src/components/ui/badges/QuorumBadge.tsx b/src/components/ui/badges/QuorumBadge.tsx index e010a66a4e..2e81fea1a2 100644 --- a/src/components/ui/badges/QuorumBadge.tsx +++ b/src/components/ui/badges/QuorumBadge.tsx @@ -33,7 +33,7 @@ export default function QuorumBadge({ proposal }: { proposal: FractalProposal }) return BigNumber.from(0); }, [votesSummary]); - const erc20MeetsQuorum = useMemo(async() => { + const erc20MeetsQuorum = useMemo(async () => { if (!ozLinearVotingContractAddress || !baseContracts || !votesToken || !votesSummary) { return undefined; } @@ -45,9 +45,9 @@ export default function QuorumBadge({ proposal }: { proposal: FractalProposal }) votesSummary.yes, votesSummary.abstain, ); - return result + return result; }, [votesToken, votesSummary, baseContracts, ozLinearVotingContractAddress]); - + // @dev only azorius governance has quorum if ((proposal as SnapshotProposal).snapshotProposalId || !votingStrategy) { return null; @@ -64,24 +64,16 @@ export default function QuorumBadge({ proposal }: { proposal: FractalProposal }) : null; const strategyQuorum = - erc721Tokens !== undefined - ? votingStrategy.quorumThreshold!.value.toNumber() - : 1; + erc721Tokens !== undefined ? votingStrategy.quorumThreshold!.value.toNumber() : 1; const reachedQuorum = - erc721Tokens !== undefined - ? totalVotesCasted.sub(votesSummary.no).toString() - : '0'; - const totalQuorum = - erc721Tokens !== undefined - ? strategyQuorum.toString() - : 0; + erc721Tokens !== undefined ? totalVotesCasted.sub(votesSummary.no).toString() : '0'; + const totalQuorum = erc721Tokens !== undefined ? strategyQuorum.toString() : 0; - const meetsQuorum = erc20MeetsQuorum !== undefined ? erc20MeetsQuorum : reachedQuorum >= totalQuorum; + const meetsQuorum = + erc20MeetsQuorum !== undefined ? erc20MeetsQuorum : reachedQuorum >= totalQuorum; const displayColor = - !totalVotesCasted.isZero() && meetsQuorum - ? quorumReachedColor - : quorumNotReachedColor; + !totalVotesCasted.isZero() && meetsQuorum ? quorumReachedColor : quorumNotReachedColor; return ( <>