Skip to content

Commit

Permalink
Improve the frontend for non-connected and non-members (fixes #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sembrestels committed Sep 25, 2024
1 parent d6dda01 commit e9f50da
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
30 changes: 24 additions & 6 deletions apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,30 @@ export default function Page() {
</Link>
<div className="flex flex-col gap-4 mb-4 text-justify">
{totalVotingPower ? (
<p>
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.
</p>
!address ? (
<p className="text-center">
Connect your wallet to view your voting power and budget
allocation.
</p>
) : (
<>
{votingPower ? (
<p>
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.
</p>
) : (
<p>
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.
</p>
)}
</>
)
) : (
<>
<Skeleton className="h-4 w-full" />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/VotingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
<Button
disabled={
Expand Down

0 comments on commit e9f50da

Please sign in to comment.