Skip to content

Commit

Permalink
Get max allocations per member from the subgraph (fixes #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
sembrestels committed Sep 23, 2024
1 parent cf0fa8b commit d2fa219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function Page() {
council={council}
projects={grantees ?? []}
initialAllocation={myAllocation}
maxVotedProjects={3}
maxVotedProjects={councilData?.maxAllocationsPerMember ?? 0}
isLoading={isLoading || !council}
votingPower={votingPower}
/>
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/hooks/useCouncil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ export const useCouncil = (council: `0x${string}` | undefined) => {
name
account
}
maxAllocationsPerMember
}
}`;
const { data, isLoading } = useQuery<{
council: {
councilName: string;
grantees: { name: string; account: `0x${string}` }[];
maxAllocationsPerMember: number;
};
}>({
queryKey: ["data"],
Expand Down

0 comments on commit d2fa219

Please sign in to comment.