Hồng Phúc

54 bundles
1 file4 months ago
1

import {

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
import { BottomTabBarOptions, BottomTabBarProps, } from '@react-navigation/bottom-tabs'; import React, {Fragment, useMemo, useCallback} from 'react'; import { View, TouchableOpacity, Image, Dimensions, Animated, SafeAreaView, StyleSheet, Text, Linking, Alert, Button, } from 'react-native'; import Svg, {Path} from 'react-native-svg'; import {openURLInBrowser} from '../../../node_modules/react-native/Libraries/Core/Devtools/openURLInBrowser'; import {TabActions} from '@react-navigation/native'; import images from '../../Themes/Images'; import {DefaultTheme} from '../../Themes'; const width = Dimensions.get('window').width; interface IConact {} interface IOpen { url: any; children: any; } const onFB = 'https://www.facebook.com/CallmeChay98/'; const OpenURLButton: React.FC<IOpen> = ({url, children}) => { const handlePress = useCallback(async () => { // Checking if the link is supported for links with custom URL scheme. const supported = await Linking.canOpenURL(url); if (supported) { // Opening the link with some app, if the URL scheme is "http" the web link should be opened // by some browser in the mobile await Linking.openURL(url); } else { Alert.alert(`Don't know how to open this URL: ${url}`); } }, [url]); return <Button title={children} onPress={handlePress} />; }; const ContactScreen: React.FC<IConact> = ({}) => { return ( <View style={styles.bodyHome}> <Image style={{ resizeMode: 'contain', width: 300, height: 300, borderRadius: 600 / 2, justifyContent: 'center', marginLeft: 45, }} source={require('../../Assets//Images/contact.png')} /> <TouchableOpacity style={styles.buttonImage}> <Text style={styles.textButton} onPress={() => { Linking.openURL('https://www.facebook.com/CallmeChay98/'); }}> Contact FB </Text> </TouchableOpacity> <TouchableOpacity style={styles.buttonImage}> <Text style={styles.textButton} onPress={() => { Linking.openURL('https://www.instagram.com/01.thanggg12/'); }}> Contact Instagram </Text> </TouchableOpacity> </View> ); }; export default ContactScreen; const styles = StyleSheet.create({ bodyHome: {}, tinyLogo: { backgroundColor: 'pink', }, buttonImage: { flexDirection: 'row', width: width, backgroundColor: '#DDDDDD', padding: 20, marginTop: 30, }, textButton: { marginLeft: 160, }, });