import { View, Text, Image, Pressable, Linking, Share } from 'react-native' import React, { useEffect } from 'react' import { useRoute } from '@react-navigation/native' import { useFonts } from 'expo-font' import { Ionicons, Fontisto } from '@expo/vector-icons'; import { useNavigation } from 'expo-router'; import { ScrollView } from 'react-native-gesture-handler'; const News = () => { useFonts({ 'playFairBold': require('../../assets/fonts/PlayfairDisplay-Bold.ttf') }) const news = useRoute().params.news; const navigation=useNavigation(); //share news const shareLink = () => { Share.share({url: news.url}) } useEffect(() => { console.log(news) },[]) //Time const publishedDate = news.publishedAt; const newInputDate = publishedDate.replace("T", " ").replace("Z", " "); //url const url = news.url return ( navigation.goBack()} style={{display: "flex", flexDirection: "row", alignItems: 'center', gap: 5}}> Back shareLink()}> {news.title} {news.source.name} {news.author} {newInputDate} {news.description} {news.content} Linking.openURL(url)} > Read More ) } export default News