import React from "react"; import { View, Text, StyleSheet, TouchableHighlight, Image } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { TopBar } from "../components/TopBar"; import { FAVORITE_CITY_DATA, getCurrentWeather, WEATHER_DATA } from "../data/stub"; export default function CityDetails({route}){ const insets = useSafeAreaInsets(); const statusBarHeight = insets.top; const city = route.params.city; const weather = getCurrentWeather(city.name) var meteo = getCurrentWeather(city.name); return ( {city.name} {city.longitude} - {city.latitude} {meteo?.weatherType} {meteo?.temperature}°C Ressenti {meteo?.temperatureFeelsLike}°C {meteo?.at} {meteo?.humidity} {meteo?.pressure} {meteo?.visibility} {meteo?.visibility} {meteo?.weatherDescription} {meteo?.windSpeed} ) } const styles = StyleSheet.create({ name: { marginTop: 30, fontSize: 35, fontWeight: "bold" }, place: { marginBottom: 20, }, petitText: { fontSize: 15 }, image: { height: 100, width: 100 }, title: { fontWeight: "bold", fontSize: 18 }, temperature: { marginTop: 10, fontSize: 25, fontWeight: "600" }, petitTemp: { fontSize: 16, marginBottom: 35 }, weatherType: { fontSize: 17, marginBottom: 20 }, button: { height: 30, width: 30, marginTop: 13, alignSelf: "flex-end", margin: 5 }, supertruc: { flexDirection: "row" }, supertrucencore: { flexDirection: "column" }, petitImage: { height: 40, width: 40, marginRight: 7, marginTop: 15 } });