import React, { useState, useSyncExternalStore } from "react"; import { View, StyleSheet, Text, Button, TouchableHighlight, Image } from "react-native"; import { City, FAVORITE_CITY_DATA, getCurrentWeather, Weather } from "../data/stub"; type VilleProps = { city: City, fav: City } export function VilleCompopo(props: VilleProps){ const weather = getCurrentWeather(props.city.name); return ( {props.city.name} {props.city.latitude} - {props.city.longitude} {weather?.temperature} FAVORITE_CITY_DATA = this.city}*/> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "darksalmon", marginVertical: 5, borderRadius: 15, width: "90%", alignSelf: 'center' }, title: { fontWeight: "bold", fontSize: 18 }, bothtext: { margin: 10 }, temperature: { marginTop: 20, fontSize: 18, fontWeight: "bold" }, button: { height: 30, width: 30, marginTop: 13, alignSelf: "flex-end", margin: 5 } });