Skip to content

Commit

Permalink
Fix participations
Browse files Browse the repository at this point in the history
  • Loading branch information
Matth26 committed Nov 30, 2024
1 parent 4ac1503 commit 2576b30
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions client/src/ui/screens/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,28 @@ export const Home = () => {
syncEntities();
}, [account?.address]);

// fetch here because Partictipation has double keys
useEffect(() => {
const clause: torii.KeysClause = {
keys: [undefined, undefined],
pattern_matching: "FixedLen",
models: ["zkube-Participation"],
};

const syncEntities = async () => {
await getSyncEntities(
toriiClient,
contractComponents as any,
{ Keys: clause },
[],
10_000,
false,
);
};

syncEntities();
}, [account?.address]);

const isMdOrLarger = useMediaQuery({ query: "(min-width: 768px)" });

// State variables for modals
Expand Down

0 comments on commit 2576b30

Please sign in to comment.