import React from 'react'; import { ActivityIndicator, ColorValue, Modal, SafeAreaView, StyleSheet, TouchableOpacity, View, Platform, } from 'react-native'; import {WebView} from 'react-native-webview'; import {ClosingCross} from './Icons'; import {StyleGuide} from '../lib/utils/styleGuide'; const isAndroid = Platform.OS === 'android'; interface Props { closeModal: () => void; loadingColor?: ColorValue; visible: boolean; url: string; } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: StyleGuide.colors.white, paddingTop: isAndroid ? 16 : 0, }, centered: {justifyContent: 'center', alignItems: 'center'}, header: { paddingHorizontal: 12, paddingVertical: 8, flexDirection: 'row-reverse', }, loaderContainer: { ...StyleSheet.absoluteFillObject, justifyContent: 'center', alignItems: 'center', backgroundColor: StyleGuide.colors.white, }, }); const PromoModal: React.FC = ({ closeModal, loadingColor, url, visible, }: Props) => { const [ready, setReady] = React.useState(false); const handleLoadEnd = React.useCallback(() => { setReady(true); }, []); return ( {!ready ? ( ) : null} ); }; export {PromoModal};