fixup: always schedule callback first
Build and Push Image / build-backend (push) Successful in 25s
Build and Push Image / build-frontend (push) Successful in 1m57s
Build and Push Image / push (push) Successful in 46s

This commit is contained in:
2026-09-13 18:07:28 +07:00 Unverified
parent 4c6106b99e
commit 7a5f6a951e
3 changed files with 12 additions and 9 deletions
+4 -4
View File
@@ -32,12 +32,12 @@ export function ActionButton({
disabled={state > 0}
{...props}
onClick={async (ev) => {
onClick?.(ev);
setState(1);
if (action === "provider")
await new Promise<void>(ctx.listenForComplete);
onClick?.(ev);
try {
if (action === "provider")
await new Promise<void>(ctx.listenForComplete);
else await action();
if (action !== "provider") await action();
setState(2);
} catch (e) {
toast.error("An error occured!");