decord/source/modules/verification/native/components/ResendEmail.tsx

107 lines
4.7 KiB
TypeScript
Raw Normal View History

// Module ID: 6663
// Function ID: 6664
2026-07-20 16:05:17 +00:00
// Name: ResendEmail
// Dependencies: [32, 19, 17, 1951, 1371, 1074, 21, 4607, 1483, 504, 38, 6664, 5673, 5744, 4603, 1114, 5027, 6665, 4305, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 6663 (ResendEmail)
import util from "util" /* 1114 */;
import ToastActionCreatorsDefault from "ToastActionCreators" /* 4305 */;
import EmailVerificationModalActionCreatorsDefault from "EmailVerificationModalActionCreators" /* 5673 */;
import AuthenticationActionCreatorsDefault from "AuthenticationActionCreators" /* 6665 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
import UserRequiredActionStore from "UserRequiredActionStore" /* 1951 */;
import UserStore from "UserStore" /* 1371 */;
2026-07-23 10:11:24 +00:00
require = fn;
const View = fn(17).View;
const VerificationModalScenes = fn(1074).VerificationModalScenes;
const jsxProd = fn(21);
({ jsx: closure_9, jsxs: c10 } = jsxProd);
const createStyles = fn(4607);
let closure_11 = createStyles.createStyles({ container: { flex: 1, padding: 16, justifyContent: "center", alignItems: "center" }, title: { marginTop: 16, textAlign: "center" }, body: { marginTop: 8, lineHeight: 18, textAlign: "center" }, resend: { marginTop: 16, width: "100%" }, change: { marginTop: 8, width: "100%" } });
const size = fn(2);
let result = size.fileFinishedImporting("modules/verification/native/components/ResendEmail.tsx");
2026-07-20 16:05:17 +00:00
export default function ResendEmail() {
let tmp = closure_11();
navigation = navigation(1483).useNavigation();
let obj = navigation(1483);
const items = [UserStore];
const stateFromStores = navigation(504).useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
currentUser = currentUser.getCurrentUser();
verified(38)(null != currentUser, "ResendEmail: user cannot be undefined");
2026-07-20 16:05:17 +00:00
return currentUser;
});
const verified = stateFromStores.verified;
const obj2 = navigation(504);
const items1 = [UserRequiredActionStore];
const stateFromStores1 = navigation(504).useStateFromStores(items1, () => action.getAction());
let obj3 = navigation(504);
const result = verified(6664).isEmailReverification(stateFromStores1);
2026-07-29 08:29:29 +00:00
let tmp16Result = !result;
const obj4 = verified(6664);
[tmp10, dependencyMap] = noop.useState(false);
_slicedToArray = noop.useRef(verified);
2026-07-20 16:05:17 +00:00
const items2 = [verified];
const effect = noop.useEffect(() => {
2026-07-20 16:05:17 +00:00
let tmp = verified;
if (verified) {
tmp = false === ref.current;
}
if (tmp) {
EmailVerificationModalActionCreatorsDefault.close();
2026-07-20 16:05:17 +00:00
}
}, items2);
const effect1 = noop.useEffect(() => {
2026-08-24 06:08:38 +00:00
closure_3.current = verified;
2026-07-20 16:05:17 +00:00
});
const items3 = [navigation];
const obj5 = { style: tmp.container, children: null };
const callback = noop.useCallback(() => {
navigation.push(VerificationModalScenes.ENTER_EMAIL);
2026-07-20 16:05:17 +00:00
}, items3);
const items4 = [closure_9(navigation(5744).EnvelopeOpenSpotIllustration, { scale: 0.75 }), , , , ];
const obj6 = { style: tmp.title, accessibilityRole: "header", variant: "heading-xl/extrabold", color: "mobile-text-heading-primary", children: null };
let intl = navigation(1114).intl;
obj6.children = intl.string(navigation(1114).t.fUtddV);
items4[1] = closure_9(navigation(4603).Text, obj6);
const obj7 = { style: tmp.body, variant: "text-sm/medium", color: "text-default", children: null };
const intl2 = navigation(1114).intl;
2026-07-29 08:29:29 +00:00
if (tmp10) {
const obj8 = { email: stateFromStores.email };
let formatResult = intl2.format(tmp2(1114).t.JqLgQL, obj8);
2026-07-20 16:05:17 +00:00
} else {
formatResult = intl2.string(tmp2(1114).t.tSXg8O);
2026-07-20 16:05:17 +00:00
}
obj7.children = formatResult;
items4[2] = closure_9(navigation(4603).Text, obj7);
const obj9 = { style: tmp.resend, children: null };
const obj10 = { text: null, variant: "primary", onPress: null, grow: true };
const intl3 = tmp2(1114).intl;
obj10.text = intl3.string(navigation(1114).t.WnX4J2);
obj10.onPress = function onPress() {
2026-07-29 08:29:29 +00:00
dependencyMap(true);
AuthenticationActionCreatorsDefault.verifyResend();
const obj3 = { key: "USER_SETTINGS_ACCOUNT_CHANGE_EMAIL_CONFIRM_CODE_SENT", content: null };
const intl = util.intl;
obj3.content = intl.string(util.t["84yeoz"]);
ToastActionCreatorsDefault.open(obj3);
2026-07-20 16:05:17 +00:00
};
obj9.children = closure_9(navigation(5027).Button, obj10);
items4[3] = closure_9(View, obj9);
2026-07-29 08:29:29 +00:00
if (!result) {
const obj11 = { style: tmp.change, children: null };
const obj12 = { text: null, variant: "secondary", onPress: null, grow: true };
const intl4 = tmp2(1114).intl;
obj12.text = intl4.string(tmp2(1114).t.Vm8akB);
obj12.onPress = callback;
obj11.children = tmp16(tmp2(5027).Button, obj12);
tmp16Result = tmp16(tmp15, obj11);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items4[4] = tmp16Result;
obj5.children = items4;
return closure_10(View, obj5);
2026-07-20 16:05:17 +00:00
};