150 lines
9.0 KiB
TypeScript
150 lines
9.0 KiB
TypeScript
/* Metro module 8960; source: modules/verification/native/components/ResendEmail.tsx; dependencies: [57, 31, 27, 1373, 1878, 661, 33, 4501, 1484, 566, 44, 8961, 8953, 5473, 4573, 1244, 4578, 5076, 3857, 2] */
|
|
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
|
|
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import UserRequiredActionStore from '../../../../stores/UserRequiredActionStore.tsx'; /* Metro dependency 1373 */
|
|
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import ToastActionCreators from '../../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
|
|
import AuthenticationActionCreators from '../../../../actions/AuthenticationActionCreators.tsx'; /* Metro dependency 5076 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as NativeModule from '../../../../design/assets/native.tsx'; /* Metro dependency 5473 */
|
|
|
|
function _fun69861(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9145:6, offset: 0x01ce5d21, size: 358 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_11 = (CreateStylesModule).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%'}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/verification/native/components/ResendEmail.tsx');
|
|
exports.default = ResendEmail;
|
|
function ResendEmail() { // fn#69862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9145:572, offset: 0x01ce5e87, size: 924 bytes, params: 1, frame: 31
|
|
const styles = useStyles();
|
|
const value2 = (UseNavigationNativeModule).useNavigation();
|
|
let useStateFromStores = FluxModule.useStateFromStores;
|
|
const {email, verified} = Reflect.apply(useStateFromStores, FluxModule, [[UserStore], _fun69863]);
|
|
useStateFromStores = FluxModule.useStateFromStores;
|
|
const isEmailReverification2 = (importDefault(8961) /* metro dependency 8961: VerificationUtils */).isEmailReverification(Reflect.apply(useStateFromStores,
|
|
FluxModule, [[UserRequiredActionStore], function() {
|
|
return UserRequiredActionStore.getAction();
|
|
}]));
|
|
const value3 = !isEmailReverification2;
|
|
const [property, env0_2] = env0_3(ReactModule.useState(false), 2);
|
|
var env0_3 = ReactModule.useRef(verified);
|
|
ReactModule.useEffect(_fun69865, [verified]);
|
|
ReactModule.useEffect(_fun69866);
|
|
const value6 = ReactModule.useCallback(_fun69867, [value2]);
|
|
const EnvelopeOpenSpotIllustration = (NativeModule).EnvelopeOpenSpotIllustration;
|
|
const items2 = [
|
|
<EnvelopeOpenSpotIllustration scale={0.75} />,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
items2[1] = (
|
|
<Text
|
|
style={styles.title}
|
|
accessibilityRole="header"
|
|
variant="heading-xl/extrabold"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.fUtddV])}
|
|
</Text>
|
|
);
|
|
items2[2] = (
|
|
<Text
|
|
style={styles.body}
|
|
variant="text-sm/medium"
|
|
color="text-default"
|
|
>
|
|
{property ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.JqLgQL,
|
|
{email: email}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tSXg8O)}
|
|
</Text>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const WnX4J2 = (require(1244) /* metro dependency 1244: indexNative */).t.WnX4J2;
|
|
items2[3] = (
|
|
<View style={styles.resend}>
|
|
<Button
|
|
text={Reflect.apply(string, intl, [WnX4J2])}
|
|
variant="primary"
|
|
onPress={onPress_69868}
|
|
grow
|
|
/>
|
|
</View>
|
|
);
|
|
items2[4] = (
|
|
isEmailReverification2
|
|
? value3
|
|
: (
|
|
<View style={styles.change}>
|
|
<Button
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Vm8akB)}
|
|
variant="secondary"
|
|
onPress={value6}
|
|
grow
|
|
/>
|
|
</View>
|
|
)
|
|
);
|
|
return (
|
|
<View style={styles.container}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
function _fun69863() { // fn#69863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9145:665, offset: 0x01ce6223, size: 58 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const currentUser = UserStore.getCurrentUser();
|
|
(Module00044)(currentUser != null, 'ResendEmail: user cannot be undefined');
|
|
return currentUser;
|
|
}
|
|
|
|
function _fun69865() { // fn#69865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9145:946, offset: 0x01ce6270, size: 67 bytes, params: 1, frame: 11
|
|
var value;
|
|
if (verified && env0_3.current === false) {
|
|
value = environment.__proto__;
|
|
value = importDefault(8953) /* metro dependency 8953: EmailVerificationModalActionCreators */;
|
|
value.close();
|
|
}
|
|
}
|
|
|
|
function _fun69866() { // fn#69866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9145:1007, offset: 0x01c3cdcc, size: 21 bytes, params: 1, frame: 2
|
|
env0_3.current = verified;
|
|
}
|
|
|
|
function _fun69867() { // fn#69867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9145:1048, offset: 0x01ce62b3, size: 34 bytes, params: 1, frame: 11
|
|
const binding = env0_0;
|
|
const push = binding.push;
|
|
const ENTER_EMAIL = VerificationModalScenes.ENTER_EMAIL;
|
|
Reflect.apply(push, binding, [ENTER_EMAIL]);
|
|
}
|
|
|
|
function ResendEmailOnPress() { // fn#69868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9145:1649, owner: ResendEmail.onPress, offset: 0x01ce62d5, size: 141 bytes, params: 1, frame: 17
|
|
env0_2(true);
|
|
(AuthenticationActionCreators).verifyResend();
|
|
const defaultImport2 = ToastActionCreators;
|
|
const open = defaultImport2.open;
|
|
const object = {key: 'USER_SETTINGS_ACCOUNT_CHANGE_EMAIL_CONFIRM_CODE_SENT'};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['84yeoz']);
|
|
Reflect.apply(open, defaultImport2, [object]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun69861, 8960, [57, 31, 27, 1373, 1878, 661, 33, 4501, 1484, 566, 44, 8961, 8953, 5473, 4573, 1244,
|
|
4578, 5076, 3857,
|
|
2]) /* metro module 8960, dependencies: [57, 31, 27, 1373, 1878, 661, 33, 4501, 1484, 566, 44, 8961, 8953, 5473, 4573, 1244, 4578, 5076, 3857, 2] */;
|