1st commit 🥳

pull/1/head
Maxence LANONE 2 years ago
parent d633637c97
commit 1e47be2ac5

@ -1,11 +1,13 @@
import { StatusBar } from 'expo-status-bar'; import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native'; import { StyleSheet, Text, View } from 'react-native';
import Meteo from './components/Meteo';
export default function App() { export default function App() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Text>Open up App.tsx to start working on your app!</Text> <Text>Open up App.tsx to start working on your!</Text>
<StatusBar style="auto" /> <StatusBar style="auto" />
<Meteo></Meteo>
</View> </View>
); );
} }

@ -0,0 +1,28 @@
import { useState } from 'react';
import { Button, StyleSheet, Text, View } from 'react-native';
import { City, Weather, CITIES_DATA, FAVORITE_CITY_DATA } from '../data/stub';
export default function Meteo() {
const [meteo, setMeteo] = useState("Meteo");
const [city, setCity] = useState<City>(new City("Paris", 48.856614, 2.3522219));
return (
<View style={styles.container}>
<Text>{city.name}</Text>
<Text>{city.latitude}</Text>
<Text>{city.longitude}</Text>
<Button title="Meteo" onPress={() => setMeteo("Meteo")} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});

21903
package-lock.json generated

File diff suppressed because it is too large Load Diff

11003
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save