From 4ce9dd56ee8d48752900e8b34723ee71892add6f Mon Sep 17 00:00:00 2001 From: ymekuria Date: Thu, 19 Sep 2024 14:11:24 -0700 Subject: [PATCH] feat(index.page.tsx): add initialization of ZkappWorkerClient to improve functionality and state management in Home component --- .../zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx b/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx index a6c617018..64a4a9da6 100644 --- a/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx +++ b/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx @@ -35,6 +35,9 @@ export default function Home() { }); } + const zkappWorkerClient = new ZkappWorkerClient(); + setState(prev => ({ ...prev, zkappWorkerClient })); + (async () => { if (!state.hasBeenSetup) { setDisplayText('Loading web worker...');