import React, { useState } from 'react' import { View, Text, StyleSheet, TouchableOpacity, ScrollView, Image } from 'react-native'; import { fullDateFormater } from '../../../utils/date'; import { useSelector } from 'react-redux'; import { useNavigation } from '@react-navigation/native'; import Elements from '../../../components/elements'; import LinearGradient from 'react-native-linear-gradient'; import Icon from '../../../components/icons'; import Theme from '../../../components/theme.style'; import IQAIRDetails from './IQAIRDetails'; const index = (props) => { const { value, iqairData, id } = props.route.params; const { item } = value; const navigation = useNavigation(); const app_theme = useSelector(state => state.appThemeReducer.theme); const dark = app_theme?.theme.dark; const [IQAir, setIQAir] = useState(iqairData); const [ID, setID] = useState(id); const onPressBack = () => { navigation.goBack(); } const returnWeatherDate = () => { const newDate = fullDateFormater(IQAir.weather.ts); return newDate } return ( IQAIR {item.name} {item.address} navigation.navigate("Guide")}> Sensor provide by Unioil Petroleum Philippines, Inc. Last update {returnWeatherDate()} Coming Soon ) } export default index const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: Theme.colors.white }, header: { height: 50, backgroundColor: Theme.colors.primary, top: 0, left: 0, right: 0, }, scrollView: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, }, buttonContainer: { height: 50, flexDirection: 'row', alignItems: 'center', paddingHorizontal: 10, }, button: { width: 30, paddingVertical: 10 }, title: { flex: 1, textAlign: 'center', fontSize: 17, color: Theme.colors.white, fontWeight: "bold" }, buttonIcon: { color: Theme.colors.white }, subContainer: { flex: 1 }, infoContainer: { width: '100%', alignItems: 'center', paddingTop: 20, paddingBottom: 30, borderBottomRightRadius: 400, borderBottomLeftRadius: 400, backgroundColor: Theme.colors.white }, infoName: { color: Theme.colors.primary, fontSize: 20, }, infoAddress: { color: Theme.colors.searchText, marginHorizontal: 55, fontSize: 15, marginTop: 5, textAlign: 'center' }, darkText: { color: Theme.colors.white }, darkBackground: { backgroundColor: Theme.colors.black }, grayBackground: (appTheme) => { return { backgroundColor: appTheme?.theme.colors.border } }, sensorByContainer: { marginTop: 10, backgroundColor: 'white', flexDirection: 'row', paddingVertical: 10, marginHorizontal: 35, borderRadius: 5, paddingHorizontal: 10, paddingVertical: 15, alignItems: 'center' }, sensorByIcon: { height: 20, width: 40 }, sensorByText: { flex: 1, paddingLeft: 9, paddingRight: 20, textAlign: 'center', fontSize: 10 }, comingSoonContainer: { alignItems: 'center', justifyContent: 'center', height: Theme.screen.h * .3, paddingVertical: 10, backgroundColor: 'white', marginHorizontal: 35, marginTop: 10, marginBottom: 20 }, comingSoonText: { fontSize: 10 } })