MCPcopy Index your code
hub / github.com/bytebase/bytebase / sendCode

Function sendCode

frontend/src/react/components/auth/EmailCodeSigninForm.tsx:61–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 };
60
61 const sendCode = async () => {
62 if (!isValidEmail(email) || sending || resendCountdown > 0) return;
63 setSending(true);
64 try {
65 await useAppStore
66 .getState()
67 .sendEmailLoginCode(email, resolveWorkspaceName());
68 setStep("code");
69 startCountdown();
70 } catch (e) {
71 pushNotification({
72 module: "bytebase",
73 style: "CRITICAL",
74 title: t("auth.sign-in.failed-to-send-code", { error: String(e) }),
75 });
76 } finally {
77 setSending(false);
78 }
79 };
80
81 const submitCode = (parts: string[]) => {
82 const code = parts.join("");

Callers 1

handleSubmitFunction · 0.85

Calls 5

isValidEmailFunction · 0.90
resolveWorkspaceNameFunction · 0.90
pushNotificationFunction · 0.90
startCountdownFunction · 0.70
tFunction · 0.50

Tested by

no test coverage detected