50 lines
2.2 KiB
TypeScript
50 lines
2.2 KiB
TypeScript
// Metro module 16130 (f16131).
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { useAgeGateVerifyContent } from "../../AgeGateUtils";
|
|
import { useMaybePerformReactiveCheckForSource } from "../../../age_assurance/AgeVerificationUtils";
|
|
import { SafeAreaPaddingView } from "../../../../components_native/common/SafeAreaView";
|
|
import { ShieldSpotIllustration } from "../../../../design/assets/native";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
import { Button } from "../../../../design/components/Button/native/Button.native";
|
|
import AgeVerificationActionCreators_native from "../../../age_assurance/AgeVerificationActionCreators.native";
|
|
import { AgeVerificationModalEntryPoint } from "../../../age_assurance/AgeVerificationAnalyticsUtils";
|
|
const useStyles = createStyles({
|
|
container: {
|
|
padding: Module712.space.PX_16,
|
|
flex: 1,
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
gap: Module712.space.PX_16
|
|
},
|
|
header: {
|
|
textAlign: "center"
|
|
},
|
|
body: {
|
|
textAlign: "center"
|
|
},
|
|
buttonWrapper: {
|
|
width: "100%"
|
|
}
|
|
});
|
|
export default function AgeGateVerify(props) {
|
|
const source = props.source;
|
|
const styles = useStyles();
|
|
const ageGateVerifyContent = useAgeGateVerifyContent(source);
|
|
const { verifyAgreementButtonText, verifyGateDescription, verifyTitle } = ageGateVerifyContent;
|
|
useMaybePerformReactiveCheckForSource(source);
|
|
return <SafeAreaPaddingView top style={styles.container}>
|
|
<ShieldSpotIllustration />
|
|
<Text style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{verifyTitle}</Text>
|
|
<Text style={styles.body} variant="text-md/medium" color="interactive-text-default">{verifyGateDescription}</Text>
|
|
{verifyAgreementButtonText != null && <View style={styles.buttonWrapper}>
|
|
<Button text={verifyAgreementButtonText} onPress={function onPress() {
|
|
AgeVerificationActionCreators_native.showAgeVerificationGetStartedModal({
|
|
entryPoint: AgeVerificationModalEntryPoint.NSFW_AGE_GATE
|
|
});
|
|
}} grow />
|
|
</View>}
|
|
</SafeAreaPaddingView>;
|
|
};
|