Skip to content

Commit

Permalink
Disable unused inputs when max projects reached in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sembrestels committed Sep 26, 2024
1 parent 06eaa6f commit 38fca80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion apps/web/src/components/VotingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ function VoteControls({
-
</Button>
<Input
disabled={!votingPower}
disabled={
!votingPower ||
(votedProjects.length >= maxVotedProjects &&
!votes[project.account])
}
type="number"
value={voteCount}
onChange={(e) =>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/hooks/useAllocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const useAllocation = (
amounts: string[];
}[];
}>({
queryKey: ["allocation"],
queryKey: ["allocation", council, councilMember],
async queryFn() {
return await request(url, query, {
council: council?.toLowerCase(),
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/hooks/useCouncil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const useCouncil = (council: `0x${string}` | undefined) => {
pool: string;
};
}>({
queryKey: ["data"],
queryKey: ["council", council],
async queryFn() {
return await request(url, query, { council: council?.toLowerCase() });
},
Expand Down

0 comments on commit 38fca80

Please sign in to comment.