Skip to content

Commit

Permalink
Merge branch 'dev' into fixing-beta-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin authored Nov 15, 2024
2 parents 522a606 + 164a26b commit f4e2c78
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 32 deletions.
2 changes: 1 addition & 1 deletion apps/web/components/ProposalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export function ProposalCard({
</span>
/{memberPoolWeight}%{" "}
<span className="text-neutral-soft-content text-sm">
({inputValue}% of your total support)
({inputValue}% of your voting weight)
</span>
</p>
{/* <p className="text-primary-content">Support</p> */}
Expand Down
49 changes: 18 additions & 31 deletions apps/web/components/Proposals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,6 @@ export function Proposals({
{
id: 2,
name: "Voting weight used",
stat: calcPoolWeightUsed(memberSupportedProposalsPct),
className: poolWeightClassName,
info: "Indicates the portion of your pool weight currently allocated in proposals.",
},
{
id: 3,
name: "Total support",
stat: memberSupportedProposalsPct,
className: `${
memberSupportedProposalsPct >= 100 ?
Expand Down Expand Up @@ -602,34 +595,28 @@ function UserAllocationStats({ stats }: { stats: Stats[] }) {
return (
<div className="mt-10">
<h3>Support Overview</h3>
<div className="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
<div className="mt-5 grid grid-cols-1 gap-10 sm:grid-cols-2 lg:grid-cols-2">
{stats.map((stat) => (
<div
key={`stat_${stat.id}`}
className="section-layout sm:px-6 sm:pt-6"
>
<div>
<div
className={`radial-progress absolute rounded-full border-4 border-neutral transition-all duration-300 ease-in-out ${stat.className}`}
style={{
// @ts-ignore
"--value": stat.stat,
"--size": "4rem",
"--thickness": "0.35rem",
}}
role="progressbar"
>
<span className="text-xs">{stat.stat} %</span>
</div>

<div key={`stat_${stat.id}`} className="section-layout flex gap-4">
<div
className={`radial-progress rounded-full border-4 border-neutral transition-all duration-300 ease-in-out ${stat.className}`}
style={{
// @ts-ignore
"--value": stat.stat,
"--size": "4.2rem",
"--thickness": "0.35rem",
}}
role="progressbar"
>
<span className="text-xs">{stat.stat} %</span>
</div>
<div className="flex flex-col items-start justify-center">
<InfoWrapper tooltip={stat.info}>
<p className="ml-20">
<h5>
<TooltipIfOverflow>{stat.name}</TooltipIfOverflow>
</p>
</h5>
</InfoWrapper>
</div>
<div className="ml-20">
<p className="text-2xl font-semibold">{stat.stat} %</p>
<p className="text-2xl font-semibold text-right">{stat.stat} %</p>
</div>
</div>
))}
Expand Down

0 comments on commit f4e2c78

Please sign in to comment.