Skip to content

Commit f345b8a

Browse files
committed
feat(customNextPage.js): add new UI element to display ZKprogram state and error messages, with corresponding buttons to update the ZKprogram
1 parent 9841901 commit f345b8a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/lib/ui/next/customNextPage.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,23 @@ export default function Home() {
154154
<button onClick={updateZkApp} className={styles.button}>Call Add.update()</button>))}
155155
</div>
156156
</div>
157+
<div className={styles.state}>
158+
<div>
159+
<div>
160+
ZKprogram State:{" "}
161+
<span className={styles.bold}>{contractState}</span>
162+
</div>
163+
{error ? (
164+
<span className={styles.error}>Error: {error}</span>
165+
) : loading ? (
166+
<div>Loading...</div>
167+
) : (
168+
<button onClick={updateZKprogram} className={styles.button}>
169+
Call Add.update()
170+
</button>
171+
)}
172+
</div>
173+
</div>
157174
<div className={styles.grid}>
158175
<a
159176
href="https://docs.minaprotocol.com/zkapps"

0 commit comments

Comments
 (0)