diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx
index 04686f1..9b9d140 100644
--- a/packages/nextjs/app/page.tsx
+++ b/packages/nextjs/app/page.tsx
@@ -219,9 +219,12 @@ const Home: NextPage = () => {
}
}
+ const [computing, setComputing] = useState(false);
+
// compute on secrets
async function handleCompute() {
if (programId) {
+ setComputing(true);
// await compute(
// nillion,
// nillionClient,
@@ -263,6 +266,7 @@ const Home: NextPage = () => {
console.log("error", error);
return "error";
}
+ setComputing(false);
}
}
@@ -413,15 +417,19 @@ const Home: NextPage = () => {
value={partyIdToSecretIds}
onChange={e => setPartyIdToSecretIds(e.target.value)}
/>
-
+ {computing ? (
+ "Computing..."
+ ) : (
+
+ )}
) : (