From e9f50da7f033fac336ef1e95208be0517c537db4 Mon Sep 17 00:00:00 2001 From: Sem <931684+sembrestels@users.noreply.github.com> Date: Wed, 25 Sep 2024 23:09:11 +0100 Subject: [PATCH] Improve the frontend for non-connected and non-members (fixes #2) --- apps/web/src/app/page.tsx | 30 ++++++++++++++++++++------ apps/web/src/components/VotingCard.tsx | 2 +- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index 089f03f..dd83bab 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -61,12 +61,30 @@ export default function Page() {
{totalVotingPower ? ( -

- You are 1 of {councilMembers?.length} council members, holding{" "} - {((votingPower / totalVotingPower) * 100).toFixed(2)}% of the total - voting power. Your vote plays a significant role in determining how - the budget is allocated to projects. Use your influence wisely. -

+ !address ? ( +

+ Connect your wallet to view your voting power and budget + allocation. +

+ ) : ( + <> + {votingPower ? ( +

+ You are 1 of {councilMembers?.length} council members, holding{" "} + {((votingPower / totalVotingPower) * 100).toFixed(2)}% of the + total voting power. Your vote plays a significant role in + determining how the budget is allocated to projects. Use your + influence wisely. +

+ ) : ( +

+ You are not currently a council member. Only council members + have voting power and can influence budget allocations. Stay + tuned for future opportunities to join the council. +

+ )} + + ) ) : ( <> diff --git a/apps/web/src/components/VotingCard.tsx b/apps/web/src/components/VotingCard.tsx index 547fbd2..b7d72ce 100644 --- a/apps/web/src/components/VotingCard.tsx +++ b/apps/web/src/components/VotingCard.tsx @@ -173,7 +173,7 @@ function VoteControls({ onChange={(e) => handleVote(project.account, Number.parseInt(e.target.value)) } - className="w-16 bg-gray-600 text-center text-white rounded-none px-3 py-1 input-number-hide-arrows border-none focus-visible:ring-0 focus-visible:ring-offset-0" + className="w-16 bg-gray-600 text-center text-white rounded-none px-3 py-1 input-number-hide-arrows border-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-default" />