Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Keep PhoneSetupFlow.tsx at its line pin after #5565

milind-soni800b43023242
diff --git a/src/components/PhoneSetupFlow.tsx b/src/components/PhoneSetupFlow.tsx
index 979592b5f5..1ba58cb47c 100644
--- a/src/components/PhoneSetupFlow.tsx
+++ b/src/components/PhoneSetupFlow.tsx
@@ -155,7 +155,6 @@ export interface PhoneSetupController {
cancel: () => void;
refreshCode: () => void;
finish: () => void;
- /** The state after the call, or null when it did not run or failed (then `error` says why). */
act: (call: (companion: CompanionBridge) => Promise<CompanionState>) => Promise<CompanionState | null>;
accountAct: (call: (remote: AccountBridge) => Promise<CompanionAccountState>) => Promise<void>;
}
@@ -248,16 +247,14 @@ export function usePhoneSetupController(profileEmail = ""): PhoneSetupController
companionMutationEpoch,
() => call(companion),
);
- if (mounted.current) setState(next);
- return next;
+ if (mounted.current) setState(next); return next;
} catch (cause) {
if (mounted.current) setError(
normalizePhoneSetupActionError(
cause,
t("phone.error.remoteUpdate"),
),
- );
- return null;
+ ); return null;
} finally {
if (mounted.current) setActionBusy(false);
}