diff --git a/iut-expo-starter/.expo/packager-info.json b/iut-expo-starter/.expo/packager-info.json index 765d447b..f76bd557 100644 --- a/iut-expo-starter/.expo/packager-info.json +++ b/iut-expo-starter/.expo/packager-info.json @@ -1,5 +1,5 @@ { - "expoServerPort": null, + "expoServerPort": 19000, "packagerPort": 19000, "packagerPid": null, "expoServerNgrokUrl": null, diff --git a/iut-expo-starter/assets/Nuageux.png b/iut-expo-starter/assets/Nuageux.png new file mode 100644 index 00000000..b370f4e6 Binary files /dev/null and b/iut-expo-starter/assets/Nuageux.png differ diff --git a/iut-expo-starter/assets/Soleil.png b/iut-expo-starter/assets/Soleil.png new file mode 100644 index 00000000..219a6594 Binary files /dev/null and b/iut-expo-starter/assets/Soleil.png differ diff --git a/iut-expo-starter/assets/humidity.png b/iut-expo-starter/assets/humidity.png new file mode 100644 index 00000000..e5d5390f Binary files /dev/null and b/iut-expo-starter/assets/humidity.png differ diff --git a/iut-expo-starter/assets/temperature.png b/iut-expo-starter/assets/temperature.png new file mode 100644 index 00000000..9644960d Binary files /dev/null and b/iut-expo-starter/assets/temperature.png differ diff --git a/iut-expo-starter/components/VilleCompopo.tsx b/iut-expo-starter/components/VilleCompopo.tsx index 44c6cc42..3117b988 100644 --- a/iut-expo-starter/components/VilleCompopo.tsx +++ b/iut-expo-starter/components/VilleCompopo.tsx @@ -1,6 +1,6 @@ import React, { useState, useSyncExternalStore } from "react"; import { View, StyleSheet, Text, Button, TouchableHighlight, Image } from "react-native"; -import { City, getCurrentWeather, Weather } from "../data/stub"; +import { City, FAVORITE_CITY_DATA, getCurrentWeather, Weather } from "../data/stub"; type VilleProps = { @@ -19,8 +19,8 @@ const weather = getCurrentWeather(props.city.name); {props.city.latitude} - {props.city.longitude} {weather?.temperature} - props.fav = this.city}*/> - + FAVORITE_CITY_DATA = this.city}*/> + diff --git a/iut-expo-starter/screens/CityDetails.tsx b/iut-expo-starter/screens/CityDetails.tsx index 99c17771..170da2ec 100644 --- a/iut-expo-starter/screens/CityDetails.tsx +++ b/iut-expo-starter/screens/CityDetails.tsx @@ -1,8 +1,8 @@ import React from "react"; -import { View, Text } from "react-native"; +import { View, Text, StyleSheet, TouchableHighlight, Image } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { TopBar } from "../components/TopBar"; -import { getCurrentWeather } from "../data/stub"; +import { FAVORITE_CITY_DATA, getCurrentWeather, WEATHER_DATA } from "../data/stub"; export default function CityDetails({route}){ const insets = useSafeAreaInsets(); @@ -11,10 +11,87 @@ export default function CityDetails({route}){ const city = route.params.city; const weather = getCurrentWeather(city.name) + var meteo = getCurrentWeather(city.name); + return ( - + - {city.name} + {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} ) -} \ No newline at end of file +} + +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 + } + }); \ No newline at end of file