69 lines
2.6 KiB
TypeScript
69 lines
2.6 KiB
TypeScript
// Metro module 11791 (f11792).
|
|
import { View } from "react-native";
|
|
import UserStore from "../../../../stores/UserStore";
|
|
import { AnalyticEvents, AnalyticsSections } from "../../../../Constants";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { useStateFromStores } from "../../../../_bundle/Module589";
|
|
import FastImage from "../../../../components_native/common/FastImage";
|
|
import Module11792 from "../../../../_bundle/Module11792";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { Button } from "../../../../design/components/Button/native/Button.native";
|
|
import AnalyticsUtils from "../../../../utils/AnalyticsUtils";
|
|
import UserUtils from "../../../../utils/UserUtils";
|
|
import { showShareActionSheet } from "../../../action_sheet/native/showShareActionSheet";
|
|
const useStyles = createStyles({
|
|
container: {
|
|
flex: 1,
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
paddingHorizontal: 16
|
|
},
|
|
art: {
|
|
marginBottom: 16
|
|
},
|
|
title: {
|
|
marginBottom: 8,
|
|
textAlign: "center"
|
|
},
|
|
subtitle: {
|
|
lineHeight: 18,
|
|
textAlign: "center"
|
|
},
|
|
button: {
|
|
marginTop: Module712.space.PX_24,
|
|
marginHorizontal: Module712.space.PX_16,
|
|
paddingBottom: Module712.space.PX_32
|
|
}
|
|
});
|
|
export default function ContactSyncInviteFriends() {
|
|
const styles = useStyles();
|
|
const stateFromStores = useStateFromStores([UserStore], () => UserStore.getCurrentUser());
|
|
return <>
|
|
<View style={styles.container}>
|
|
<FastImage style={styles.art} source={Module11792} />
|
|
<Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">
|
|
{intl.string(t.ZxBpLf)}
|
|
</Text>
|
|
<Text style={styles.subtitle} variant="text-sm/medium" color="text-default">
|
|
{intl.string(t["fXtCJ+"])}
|
|
</Text>
|
|
</View>
|
|
<View style={styles.button}>
|
|
<Button variant="primary" size="lg" text={intl.string(t["6Qgrev"])} onPress={function onPress() {
|
|
AnalyticsUtils.track(AnalyticEvents.FRIEND_ADD_VIEWED, {
|
|
friend_add_type: "Invite",
|
|
source_page: AnalyticsSections.CONTACT_SYNC_MODAL
|
|
});
|
|
showShareActionSheet({
|
|
message: intl.formatToPlainString(t["6E9a1J"], {
|
|
url: "https://discord.com/",
|
|
username: stateFromStores != null ? UserUtils.getUserTag(stateFromStores) : ""
|
|
})
|
|
}, AnalyticsSections.CONTACT_SYNC_MODAL);
|
|
}} />
|
|
</View>
|
|
</>;
|
|
};
|