La navigation marche enfin

master
Thomas Chazot 2 years ago
parent afd8eda721
commit 1133bd97d9

@ -0,0 +1 @@
{"ast":null,"code":"import { createStackNavigator } from \"@react-navigation/stack\";\nimport React from \"react\";\nimport { SafeAreaProvider } from \"react-native-safe-area-context\";\nimport CityDetails from \"../screens/CityDetails\";\nimport CityList from \"../screens/CityList\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function StackNavigation() {\n var Stack = createStackNavigator();\n return _jsx(SafeAreaProvider, {\n children: _jsxs(Stack.Navigator, {\n initialRouteName: \"CityList\",\n children: [_jsx(Stack.Screen, {\n name: \"CityList\",\n component: CityList\n }), _jsx(Stack.Screen, {\n name: \"CityDetails\",\n component: CityDetails\n })]\n })\n });\n}","map":{"version":3,"names":["createStackNavigator","React","SafeAreaProvider","CityDetails","CityList","StackNavigation","Stack"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/navigation/StackNavigation.tsx"],"sourcesContent":["import { NavigationContainer } from \"@react-navigation/native\";\nimport { createStackNavigator } from \"@react-navigation/stack\";\n\nimport React from \"react\";\nimport { SafeAreaProvider } from \"react-native-safe-area-context\";\nimport CityDetails from \"../screens/CityDetails\";\nimport CityList from \"../screens/CityList\";\n\nexport default function StackNavigation() {\n \n const Stack = createStackNavigator();\n return (\n <SafeAreaProvider>\n <Stack.Navigator initialRouteName=\"CityList\">\n <Stack.Screen name=\"CityList\" component={CityList}/>\n <Stack.Screen name=\"CityDetails\" component={CityDetails}/>\n </Stack.Navigator>\n </SafeAreaProvider>\n\n\n )\n }"],"mappings":"AACA,SAASA,oBAAoB,QAAQ,yBAAyB;AAE9D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,OAAOC,WAAW;AAClB,OAAOC,QAAQ;AAA4B;AAAA;AAE3C,eAAe,SAASC,eAAe,GAAG;EAEtC,IAAMC,KAAK,GAAGN,oBAAoB,EAAE;EACpC,OACE,KAAC,gBAAgB;IAAA,UACf,MAAC,KAAK,CAAC,SAAS;MAAC,gBAAgB,EAAC,UAAU;MAAA,WAC1C,KAAC,KAAK,CAAC,MAAM;QAAC,IAAI,EAAC,UAAU;QAAC,SAAS,EAAEI;MAAS,EAAE,EACpD,KAAC,KAAK,CAAC,MAAM;QAAC,IAAI,EAAC,aAAa;QAAC,SAAS,EAAED;MAAY,EAAE;IAAA;EAC1C,EACD;AAIvB"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\nimport TabNavigation from \"./navigation/TabNavigation\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function App() {\n return _jsx(SafeAreaProvider, {\n style: styles.container,\n children: _jsx(TabNavigation, {})\n });\n}\nvar styles = StyleSheet.create({\n container: {\n flex: 1,\n height: \"100%\",\n backgroundColor: '#fff'\n }\n});","map":{"version":3,"names":["React","SafeAreaProvider","TabNavigation","App","styles","container","StyleSheet","create","flex","height","backgroundColor"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/App.tsx"],"sourcesContent":["import { StatusBar } from 'expo-status-bar';\nimport React from 'react';\nimport { SafeAreaView, StyleSheet, Text, View } from 'react-native';\nimport { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';\nimport TabNavigation from './navigation/TabNavigation';\nimport CityList from './screens/CityList';\n\n\nexport default function App() {\n return (\n <SafeAreaProvider style={styles.container}>\n <TabNavigation/>\n </SafeAreaProvider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n height: \"100%\",\n backgroundColor: '#fff',\n //alignItems: 'center',\n //justifyContent: 'center',\n },\n});\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAAC;AAE1B,SAA4BC,gBAAgB,QAAQ,gCAAgC;AACpF,OAAOC,aAAa;AAAmC;AAIvD,eAAe,SAASC,GAAG,GAAG;EAC5B,OACE,KAAC,gBAAgB;IAAC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAA,UACxC,KAAC,aAAa;EAAE,EACC;AAEvB;AAEA,IAAMD,MAAM,GAAGE,UAAU,CAACC,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,eAAe,EAAE;EAGnB;AACF,CAAC,CAAC"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import View from \"react-native-web/dist/exports/View\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { FlatList } from \"react-native-gesture-handler\";\nimport { CITIES_DATA, FAVORITE_CITY_DATA } from \"../data/stub\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function Home() {\n var insets = useSafeAreaInsets();\n var statusBarHeight = insets.top;\n var favoriteCity = FAVORITE_CITY_DATA;\n return _jsxs(View, {\n style: {\n alignItems: \"center\",\n marginTop: statusBarHeight\n },\n children: [_jsx(TopBar, {}), _jsx(FlatList, {\n data: CITIES_DATA,\n keyExtractor: function keyExtractor(item) {\n return item.name;\n },\n renderItem: function renderItem(_ref) {\n var item = _ref.item;\n return _jsx(VilleCompopo, {\n city: item\n });\n },\n style: {\n width: \"100%\",\n alignSelf: \"center\"\n }\n })]\n });\n}\nvar leStyle = StyleSheet.create({\n container: {\n alignItems: 'center'\n }\n});","map":{"version":3,"names":["FlatList","CITIES_DATA","FAVORITE_CITY_DATA","useSafeAreaInsets","VilleCompopo","TopBar","Home","insets","statusBarHeight","top","favoriteCity","alignItems","marginTop","item","name","width","alignSelf","leStyle","StyleSheet","create","container"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/screens/Home.tsx"],"sourcesContent":["import { View, Text, StyleSheet } from \"react-native\"\nimport { FlatList } from \"react-native-gesture-handler\"\nimport { CITIES_DATA, City, FAVORITE_CITY_DATA } from \"../data/stub\"\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\n\n\nexport default function Home(){\n const insets = useSafeAreaInsets();\n const statusBarHeight = insets.top;\n const favoriteCity = FAVORITE_CITY_DATA;\n\n return (\n <View style={{alignItems: \"center\", marginTop: statusBarHeight}}>\n <TopBar/>\n <FlatList\n data={CITIES_DATA}\n keyExtractor={item =>item.name}\n renderItem={({item}) => <VilleCompopo city={item}/>}\n style={{width: \"100%\", alignSelf: \"center\"}} \n />\n </View>\n )\n}\n\n\nconst leStyle = StyleSheet.create({\n container: {\n alignItems: 'center',\n },\n});"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,WAAW,EAAQC,kBAAkB;AAC9C,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,YAAY;AACrB,SAASC,MAAM;AAA+B;AAAA;AAG9C,eAAe,SAASC,IAAI,GAAE;EAC1B,IAAMC,MAAM,GAAGJ,iBAAiB,EAAE;EAClC,IAAMK,eAAe,GAAGD,MAAM,CAACE,GAAG;EAClC,IAAMC,YAAY,GAAGR,kBAAkB;EAEvC,OACI,MAAC,IAAI;IAAC,KAAK,EAAE;MAACS,UAAU,EAAE,QAAQ;MAAEC,SAAS,EAAEJ;IAAe,CAAE;IAAA,WAC5D,KAAC,MAAM,KAAE,EACT,KAAC,QAAQ;MACT,IAAI,EAAEP,WAAY;MAClB,YAAY,EAAE,sBAAAY,IAAI;QAAA,OAAGA,IAAI,CAACC,IAAI;MAAA,CAAC;MAC/B,UAAU,EAAE;QAAA,IAAED,IAAI,QAAJA,IAAI;QAAA,OAAM,KAAC,YAAY;UAAC,IAAI,EAAEA;QAAK,EAAE;MAAA,CAAC;MACpD,KAAK,EAAE;QAACE,KAAK,EAAE,MAAM;QAAEC,SAAS,EAAE;MAAQ;IAAE,EAC1C;EAAA,EACC;AAEf;AAGA,IAAMC,OAAO,GAAGC,UAAU,CAACC,MAAM,CAAC;EAC9BC,SAAS,EAAE;IACPT,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import View from \"react-native-web/dist/exports/View\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { FlatList } from \"react-native-gesture-handler\";\nimport { CITIES_DATA } from \"../data/stub\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function Home() {\n var insets = useSafeAreaInsets();\n var statusBarHeight = insets.top;\n return _jsxs(View, {\n style: {\n alignItems: \"center\",\n marginTop: statusBarHeight\n },\n children: [_jsx(TopBar, {}), _jsx(FlatList, {\n data: CITIES_DATA,\n keyExtractor: function keyExtractor(item) {\n return item.name;\n },\n renderItem: function renderItem(_ref) {\n var item = _ref.item;\n return _jsx(VilleCompopo, {\n city: item\n });\n },\n style: {\n width: \"100%\",\n alignSelf: \"center\"\n }\n })]\n });\n}\nvar leStyle = StyleSheet.create({\n container: {\n alignItems: 'center'\n }\n});","map":{"version":3,"names":["FlatList","CITIES_DATA","useSafeAreaInsets","VilleCompopo","TopBar","Home","insets","statusBarHeight","top","alignItems","marginTop","item","name","width","alignSelf","leStyle","StyleSheet","create","container"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/screens/Home.tsx"],"sourcesContent":["import { View, Text, StyleSheet } from \"react-native\"\nimport { FlatList } from \"react-native-gesture-handler\"\nimport { CITIES_DATA, City, FAVORITE_CITY_DATA } from \"../data/stub\"\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\n\n\nexport default function Home(){\n const insets = useSafeAreaInsets();\n const statusBarHeight = insets.top;\n\n return (\n <View style={{alignItems: \"center\", marginTop: statusBarHeight}}>\n <TopBar/>\n <FlatList\n data={CITIES_DATA}\n keyExtractor={item =>item.name}\n renderItem={({item}) => <VilleCompopo city={item}/>}\n style={{width: \"100%\", alignSelf: \"center\"}} \n />\n </View>\n )\n}\n\n\nconst leStyle = StyleSheet.create({\n container: {\n alignItems: 'center',\n },\n});"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,WAAW;AACpB,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,YAAY;AACrB,SAASC,MAAM;AAA+B;AAAA;AAG9C,eAAe,SAASC,IAAI,GAAE;EAC1B,IAAMC,MAAM,GAAGJ,iBAAiB,EAAE;EAClC,IAAMK,eAAe,GAAGD,MAAM,CAACE,GAAG;EAElC,OACI,MAAC,IAAI;IAAC,KAAK,EAAE;MAACC,UAAU,EAAE,QAAQ;MAAEC,SAAS,EAAEH;IAAe,CAAE;IAAA,WAC5D,KAAC,MAAM,KAAE,EACT,KAAC,QAAQ;MACT,IAAI,EAAEN,WAAY;MAClB,YAAY,EAAE,sBAAAU,IAAI;QAAA,OAAGA,IAAI,CAACC,IAAI;MAAA,CAAC;MAC/B,UAAU,EAAE;QAAA,IAAED,IAAI,QAAJA,IAAI;QAAA,OAAM,KAAC,YAAY;UAAC,IAAI,EAAEA;QAAK,EAAE;MAAA,CAAC;MACpD,KAAK,EAAE;QAACE,KAAK,EAAE,MAAM;QAAEC,SAAS,EAAE;MAAQ;IAAE,EAC1C;EAAA,EACC;AAEf;AAGA,IAAMC,OAAO,GAAGC,UAAU,CAACC,MAAM,CAAC;EAC9BC,SAAS,EAAE;IACPT,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import { createStackNavigator } from \"@react-navigation/stack\";\nimport React from \"react\";\nimport CityDetails from \"../screens/CityDetails\";\nimport CityList from \"../screens/CityList\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function StackNavigation() {\n var Stack = createStackNavigator();\n return _jsxs(Stack.Navigator, {\n initialRouteName: \"CityList\",\n children: [_jsx(Stack.Screen, {\n name: \"CityList\",\n component: CityList\n }), _jsx(Stack.Screen, {\n name: \"CityDetails\",\n component: CityDetails\n })]\n });\n}","map":{"version":3,"names":["createStackNavigator","React","CityDetails","CityList","StackNavigation","Stack"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/navigation/StackNavigation.tsx"],"sourcesContent":["import { NavigationContainer } from \"@react-navigation/native\";\nimport { createStackNavigator } from \"@react-navigation/stack\";\n\nimport React from \"react\";\nimport { SafeAreaProvider } from \"react-native-safe-area-context\";\nimport CityDetails from \"../screens/CityDetails\";\nimport CityList from \"../screens/CityList\";\n\nexport default function StackNavigation() {\n \n const Stack = createStackNavigator();\n return (\n <Stack.Navigator initialRouteName=\"CityList\">\n <Stack.Screen name=\"CityList\" component={CityList}/>\n <Stack.Screen name=\"CityDetails\" component={CityDetails}/>\n </Stack.Navigator>\n\n\n )\n }"],"mappings":"AACA,SAASA,oBAAoB,QAAQ,yBAAyB;AAE9D,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,WAAW;AAClB,OAAOC,QAAQ;AAA4B;AAAA;AAE3C,eAAe,SAASC,eAAe,GAAG;EAEtC,IAAMC,KAAK,GAAGL,oBAAoB,EAAE;EACpC,OACI,MAAC,KAAK,CAAC,SAAS;IAAC,gBAAgB,EAAC,UAAU;IAAA,WAC1C,KAAC,KAAK,CAAC,MAAM;MAAC,IAAI,EAAC,UAAU;MAAC,SAAS,EAAEG;IAAS,EAAE,EACpD,KAAC,KAAK,CAAC,MAAM;MAAC,IAAI,EAAC,aAAa;MAAC,SAAS,EAAED;IAAY,EAAE;EAAA,EAC1C;AAIxB"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import View from \"react-native-web/dist/exports/View\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { FAVORITE_CITY_DATA } from \"../data/stub\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { TopBar } from \"../components/TopBar\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function Home() {\n var insets = useSafeAreaInsets();\n var statusBarHeight = insets.top;\n var favoriteCity = FAVORITE_CITY_DATA;\n return _jsx(View, {\n style: {\n alignItems: \"center\",\n marginTop: statusBarHeight\n },\n children: _jsx(TopBar, {})\n });\n}\nvar leStyle = StyleSheet.create({\n container: {\n alignItems: 'center'\n }\n});","map":{"version":3,"names":["FAVORITE_CITY_DATA","useSafeAreaInsets","TopBar","Home","insets","statusBarHeight","top","favoriteCity","alignItems","marginTop","leStyle","StyleSheet","create","container"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/screens/Home.tsx"],"sourcesContent":["import { View, Text, StyleSheet } from \"react-native\"\nimport { FlatList } from \"react-native-gesture-handler\"\nimport { CITIES_DATA, City, FAVORITE_CITY_DATA } from \"../data/stub\"\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\n\n\nexport default function Home(){\n const insets = useSafeAreaInsets();\n const statusBarHeight = insets.top;\n const favoriteCity = FAVORITE_CITY_DATA;\n\n return (\n <View style={{alignItems: \"center\", marginTop: statusBarHeight}}>\n <TopBar/>\n </View>\n )\n}\n\n\nconst leStyle = StyleSheet.create({\n container: {\n alignItems: 'center',\n },\n});"],"mappings":";;AAEA,SAA4BA,kBAAkB;AAC9C,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,MAAM;AAA+B;AAG9C,eAAe,SAASC,IAAI,GAAE;EAC1B,IAAMC,MAAM,GAAGH,iBAAiB,EAAE;EAClC,IAAMI,eAAe,GAAGD,MAAM,CAACE,GAAG;EAClC,IAAMC,YAAY,GAAGP,kBAAkB;EAEvC,OACI,KAAC,IAAI;IAAC,KAAK,EAAE;MAACQ,UAAU,EAAE,QAAQ;MAAEC,SAAS,EAAEJ;IAAe,CAAE;IAAA,UAC5D,KAAC,MAAM;EAAE,EACN;AAEf;AAGA,IAAMK,OAAO,GAAGC,UAAU,CAACC,MAAM,CAAC;EAC9BC,SAAS,EAAE;IACPL,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import View from \"react-native-web/dist/exports/View\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { FAVORITE_CITY_DATA } from \"../data/stub\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { TopBar } from \"../components/TopBar\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function Home() {\n var insets = useSafeAreaInsets();\n var statusBarHeight = insets.top;\n var favoriteCity = FAVORITE_CITY_DATA;\n return _jsxs(View, {\n style: {\n alignItems: \"center\",\n marginTop: statusBarHeight\n },\n children: [_jsx(TopBar, {}), \"if ()\"]\n });\n}\nvar leStyle = StyleSheet.create({\n container: {\n alignItems: 'center'\n }\n});","map":{"version":3,"names":["FAVORITE_CITY_DATA","useSafeAreaInsets","TopBar","Home","insets","statusBarHeight","top","favoriteCity","alignItems","marginTop","leStyle","StyleSheet","create","container"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/screens/Home.tsx"],"sourcesContent":["import { View, Text, StyleSheet } from \"react-native\"\nimport { FlatList } from \"react-native-gesture-handler\"\nimport { CITIES_DATA, City, FAVORITE_CITY_DATA } from \"../data/stub\"\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\n\n\nexport default function Home(){\n const insets = useSafeAreaInsets();\n const statusBarHeight = insets.top;\n const favoriteCity = FAVORITE_CITY_DATA;\n\n return (\n <View style={{alignItems: \"center\", marginTop: statusBarHeight}}>\n <TopBar/>\n if ()\n </View>\n )\n}\n\n\nconst leStyle = StyleSheet.create({\n container: {\n alignItems: 'center',\n },\n});"],"mappings":";;AAEA,SAA4BA,kBAAkB;AAC9C,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,MAAM;AAA+B;AAAA;AAG9C,eAAe,SAASC,IAAI,GAAE;EAC1B,IAAMC,MAAM,GAAGH,iBAAiB,EAAE;EAClC,IAAMI,eAAe,GAAGD,MAAM,CAACE,GAAG;EAClC,IAAMC,YAAY,GAAGP,kBAAkB;EAEvC,OACI,MAAC,IAAI;IAAC,KAAK,EAAE;MAACQ,UAAU,EAAE,QAAQ;MAAEC,SAAS,EAAEJ;IAAe,CAAE;IAAA,WAC5D,KAAC,MAAM,KAAE,SAEb;EAAA,EAAO;AAEf;AAGA,IAAMK,OAAO,GAAGC,UAAU,CAACC,MAAM,CAAC;EAC9BC,SAAS,EAAE;IACPL,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import View from \"react-native-web/dist/exports/View\";\nimport Text from \"react-native-web/dist/exports/Text\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport TouchableHighlight from \"react-native-web/dist/exports/TouchableHighlight\";\nimport { FlatList } from \"react-native-gesture-handler\";\nimport { CITIES_DATA, getCurrentWeather } from \"../data/stub\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function CityList(_ref) {\n var navigation = _ref.navigation;\n var insets = useSafeAreaInsets();\n var statusBarHeight = insets.top;\n var weather = getCurrentWeather(\"babla\");\n return _jsxs(View, {\n style: {\n alignItems: \"center\",\n marginTop: statusBarHeight,\n backgroundColor: \"red\"\n },\n children: [_jsx(TopBar, {}), _jsx(FlatList, {\n data: CITIES_DATA,\n keyExtractor: function keyExtractor(item) {\n return item.name;\n },\n renderItem: function renderItem(_ref2) {\n var item = _ref2.item;\n return _jsx(TouchableHighlight, {\n onPress: function onPress() {\n return navigation.navigate(\"CityDetails\", {\n \"city\": item\n });\n },\n children: _jsx(VilleCompopo, {\n city: item\n })\n });\n },\n style: {\n width: \"100%\",\n alignSelf: \"center\"\n }\n }), _jsx(Text, {\n children: \"Toto\"\n })]\n });\n}\nvar leStyle = StyleSheet.create({\n container: {\n alignItems: 'center'\n }\n});","map":{"version":3,"names":["FlatList","CITIES_DATA","getCurrentWeather","useSafeAreaInsets","VilleCompopo","TopBar","CityList","navigation","insets","statusBarHeight","top","weather","alignItems","marginTop","backgroundColor","item","name","navigate","width","alignSelf","leStyle","StyleSheet","create","container"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/screens/CityList.tsx"],"sourcesContent":["import { View, Text, StyleSheet, TouchableHighlight } from \"react-native\"\nimport { FlatList } from \"react-native-gesture-handler\"\nimport { CITIES_DATA, City, getCurrentWeather } from \"../data/stub\"\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\n\n\nexport default function CityList({navigation}){\n const insets = useSafeAreaInsets();\n const statusBarHeight = insets.top;\n const weather = getCurrentWeather(\"babla\")\n\n return (\n <View style={{alignItems: \"center\", marginTop: statusBarHeight, backgroundColor: \"red\"}}>\n <TopBar/>\n <FlatList\n data={CITIES_DATA}\n keyExtractor={item =>item.name}\n renderItem={({item}) => <TouchableHighlight onPress={() => navigation.navigate(\"CityDetails\", {\"city\": item})}><VilleCompopo city={item}/></TouchableHighlight>}\n style={{width: \"100%\", alignSelf: \"center\"}} \n />\n\n <Text>Toto</Text>\n </View>\n )\n}\n\n\nconst leStyle = StyleSheet.create({\n container: {\n alignItems: 'center',\n },\n});"],"mappings":";;;;AACA,SAASA,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,WAAW,EAAQC,iBAAiB;AAC7C,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,YAAY;AACrB,SAASC,MAAM;AAA+B;AAAA;AAG9C,eAAe,SAASC,QAAQ,OAAc;EAAA,IAAZC,UAAU,QAAVA,UAAU;EACxC,IAAMC,MAAM,GAAGL,iBAAiB,EAAE;EAClC,IAAMM,eAAe,GAAGD,MAAM,CAACE,GAAG;EAClC,IAAMC,OAAO,GAAGT,iBAAiB,CAAC,OAAO,CAAC;EAE1C,OACI,MAAC,IAAI;IAAC,KAAK,EAAE;MAACU,UAAU,EAAE,QAAQ;MAAEC,SAAS,EAAEJ,eAAe;MAAEK,eAAe,EAAE;IAAK,CAAE;IAAA,WACpF,KAAC,MAAM,KAAE,EACT,KAAC,QAAQ;MACT,IAAI,EAAEb,WAAY;MAClB,YAAY,EAAE,sBAAAc,IAAI;QAAA,OAAGA,IAAI,CAACC,IAAI;MAAA,CAAC;MAC/B,UAAU,EAAE;QAAA,IAAED,IAAI,SAAJA,IAAI;QAAA,OAAM,KAAC,kBAAkB;UAAC,OAAO,EAAE;YAAA,OAAMR,UAAU,CAACU,QAAQ,CAAC,aAAa,EAAE;cAAC,MAAM,EAAEF;YAAI,CAAC,CAAC;UAAA,CAAC;UAAA,UAAC,KAAC,YAAY;YAAC,IAAI,EAAEA;UAAK;QAAE,EAAqB;MAAA,CAAC;MAChK,KAAK,EAAE;QAACG,KAAK,EAAE,MAAM;QAAEC,SAAS,EAAE;MAAQ;IAAE,EAC1C,EAEF,KAAC,IAAI;MAAA,UAAC;IAAI,EAAO;EAAA,EACd;AAEf;AAGA,IAAMC,OAAO,GAAGC,UAAU,CAACC,MAAM,CAAC;EAC9BC,SAAS,EAAE;IACPX,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import { createBottomTabNavigator } from \"@react-navigation/bottom-tabs\";\nimport { NavigationContainer } from \"@react-navigation/native\";\nimport React from \"react\";\nimport Home from \"../screens/Home\";\nimport StackNavigation from \"./StackNavigation\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function TabNavigation() {\n var BottomTabNavigator = createBottomTabNavigator();\n return _jsx(NavigationContainer, {\n children: _jsxs(BottomTabNavigator.Navigator, {\n initialRouteName: \"Home\",\n children: [_jsx(BottomTabNavigator.Screen, {\n name: \"Home\",\n component: Home,\n options: {\n title: 'Home'\n }\n }), _jsx(BottomTabNavigator.Screen, {\n name: \"CityList\",\n component: StackNavigation,\n options: {\n title: 'CityList'\n }\n })]\n })\n });\n}","map":{"version":3,"names":["createBottomTabNavigator","NavigationContainer","React","Home","StackNavigation","TabNavigation","BottomTabNavigator","title"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/navigation/TabNavigation.tsx"],"sourcesContent":["import { createBottomTabNavigator } from \"@react-navigation/bottom-tabs\";\nimport { NavigationContainer } from \"@react-navigation/native\";\nimport React from \"react\";\nimport CityList from \"../screens/CityList\";\nimport Home from \"../screens/Home\";\nimport StackNavigation from \"./StackNavigation\";\n\nexport default function TabNavigation() {\n const BottomTabNavigator = createBottomTabNavigator();\n return (\n <NavigationContainer>\n <BottomTabNavigator.Navigator initialRouteName=\"Home\">\n <BottomTabNavigator.Screen name=\"Home\" component={Home}\n options={{\n title: 'Home'\n }}/>\n <BottomTabNavigator.Screen name=\"CityList\" component={StackNavigation}\n options={{\n title: 'CityList',\n }}/>\n </BottomTabNavigator.Navigator>\n </NavigationContainer>\n )\n}\n"],"mappings":"AAAA,SAASA,wBAAwB,QAAQ,+BAA+B;AACxE,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,IAAI;AACX,OAAOC,eAAe;AAA0B;AAAA;AAEhD,eAAe,SAASC,aAAa,GAAG;EACpC,IAAMC,kBAAkB,GAAGN,wBAAwB,EAAE;EACrD,OACI,KAAC,mBAAmB;IAAA,UAChB,MAAC,kBAAkB,CAAC,SAAS;MAAC,gBAAgB,EAAC,MAAM;MAAA,WACjD,KAAC,kBAAkB,CAAC,MAAM;QAAC,IAAI,EAAC,MAAM;QAAC,SAAS,EAAEG,IAAK;QAC3C,OAAO,EAAE;UACLI,KAAK,EAAE;QACX;MAAE,EAAE,EAChB,KAAC,kBAAkB,CAAC,MAAM;QAAC,IAAI,EAAC,UAAU;QAAC,SAAS,EAAEH,eAAgB;QAC1C,OAAO,EAAE;UACLG,KAAK,EAAE;QACX;MAAE,EAAE;IAAA;EACL,EACb;AAE9B"},"metadata":{},"sourceType":"module"}

@ -0,0 +1 @@
{"ast":null,"code":"import View from \"react-native-web/dist/exports/View\";\nimport Text from \"react-native-web/dist/exports/Text\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport TouchableHighlight from \"react-native-web/dist/exports/TouchableHighlight\";\nimport { FlatList } from \"react-native-gesture-handler\";\nimport { CITIES_DATA } from \"../data/stub\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default function CityList(_ref) {\n var navigation = _ref.navigation;\n var insets = useSafeAreaInsets();\n var statusBarHeight = insets.top;\n return _jsxs(View, {\n style: {\n alignItems: \"center\",\n marginTop: statusBarHeight,\n backgroundColor: \"red\"\n },\n children: [_jsx(TopBar, {}), _jsx(FlatList, {\n data: CITIES_DATA,\n keyExtractor: function keyExtractor(item) {\n return item.name;\n },\n renderItem: function renderItem(_ref2) {\n var item = _ref2.item;\n return _jsx(TouchableHighlight, {\n onPress: function onPress() {\n return navigation.navigate(\"CityDetails\", {\n \"city\": item\n });\n },\n children: _jsx(VilleCompopo, {\n city: item\n })\n });\n },\n style: {\n width: \"100%\",\n alignSelf: \"center\"\n }\n }), _jsx(Text, {\n children: \"Toto\"\n })]\n });\n}\nvar leStyle = StyleSheet.create({\n container: {\n alignItems: 'center'\n }\n});","map":{"version":3,"names":["FlatList","CITIES_DATA","useSafeAreaInsets","VilleCompopo","TopBar","CityList","navigation","insets","statusBarHeight","top","alignItems","marginTop","backgroundColor","item","name","navigate","width","alignSelf","leStyle","StyleSheet","create","container"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/screens/CityList.tsx"],"sourcesContent":["import { View, Text, StyleSheet, TouchableHighlight } from \"react-native\"\nimport { FlatList } from \"react-native-gesture-handler\"\nimport { CITIES_DATA, City, getCurrentWeather } from \"../data/stub\"\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { VilleCompopo } from \"../components/VilleCompopo\";\nimport { TopBar } from \"../components/TopBar\";\n\n\nexport default function CityList({navigation}){\n const insets = useSafeAreaInsets();\n const statusBarHeight = insets.top;\n\n return (\n <View style={{alignItems: \"center\", marginTop: statusBarHeight, backgroundColor: \"red\"}}>\n <TopBar/>\n <FlatList\n data={CITIES_DATA}\n keyExtractor={item =>item.name}\n renderItem={({item}) => <TouchableHighlight onPress={() => navigation.navigate(\"CityDetails\", {\"city\": item})}><VilleCompopo city={item}/></TouchableHighlight>}\n style={{width: \"100%\", alignSelf: \"center\"}} \n />\n\n <Text>Toto</Text>\n </View>\n )\n}\n\n\nconst leStyle = StyleSheet.create({\n container: {\n alignItems: 'center',\n },\n});"],"mappings":";;;;AACA,SAASA,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,WAAW;AACpB,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,YAAY;AACrB,SAASC,MAAM;AAA+B;AAAA;AAG9C,eAAe,SAASC,QAAQ,OAAc;EAAA,IAAZC,UAAU,QAAVA,UAAU;EACxC,IAAMC,MAAM,GAAGL,iBAAiB,EAAE;EAClC,IAAMM,eAAe,GAAGD,MAAM,CAACE,GAAG;EAElC,OACI,MAAC,IAAI;IAAC,KAAK,EAAE;MAACC,UAAU,EAAE,QAAQ;MAAEC,SAAS,EAAEH,eAAe;MAAEI,eAAe,EAAE;IAAK,CAAE;IAAA,WACpF,KAAC,MAAM,KAAE,EACT,KAAC,QAAQ;MACT,IAAI,EAAEX,WAAY;MAClB,YAAY,EAAE,sBAAAY,IAAI;QAAA,OAAGA,IAAI,CAACC,IAAI;MAAA,CAAC;MAC/B,UAAU,EAAE;QAAA,IAAED,IAAI,SAAJA,IAAI;QAAA,OAAM,KAAC,kBAAkB;UAAC,OAAO,EAAE;YAAA,OAAMP,UAAU,CAACS,QAAQ,CAAC,aAAa,EAAE;cAAC,MAAM,EAAEF;YAAI,CAAC,CAAC;UAAA,CAAC;UAAA,UAAC,KAAC,YAAY;YAAC,IAAI,EAAEA;UAAK;QAAE,EAAqB;MAAA,CAAC;MAChK,KAAK,EAAE;QAACG,KAAK,EAAE,MAAM;QAAEC,SAAS,EAAE;MAAQ;IAAE,EAC1C,EAEF,KAAC,IAAI;MAAA,UAAC;IAAI,EAAO;EAAA,EACd;AAEf;AAGA,IAAMC,OAAO,GAAGC,UAAU,CAACC,MAAM,CAAC;EAC9BC,SAAS,EAAE;IACPX,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC"},"metadata":{},"sourceType":"module"}

@ -16,9 +16,10 @@ export default function App() {
const styles = StyleSheet.create({
container: {
flex: 1,
height: "100%",
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
//alignItems: 'center',
//justifyContent: 'center',
},
});

@ -2,6 +2,7 @@ import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import React from "react";
import { SafeAreaProvider } from "react-native-safe-area-context";
import CityDetails from "../screens/CityDetails";
import CityList from "../screens/CityList";
@ -9,10 +10,11 @@ export default function StackNavigation() {
const Stack = createStackNavigator();
return (
<Stack.Navigator initialRouteName="CityList">
<Stack.Screen name="CityList" component={CityList}/>
<Stack.Screen name="CityDetails" component={CityDetails}/>
</Stack.Navigator>
<Stack.Navigator initialRouteName="CityList">
<Stack.Screen name="CityList" component={CityList}/>
<Stack.Screen name="CityDetails" component={CityDetails}/>
</Stack.Navigator>
)
}

@ -2,6 +2,7 @@ import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { NavigationContainer } from "@react-navigation/native";
import React from "react";
import CityList from "../screens/CityList";
import Home from "../screens/Home";
import StackNavigation from "./StackNavigation";
export default function TabNavigation() {
@ -9,11 +10,11 @@ export default function TabNavigation() {
return (
<NavigationContainer>
<BottomTabNavigator.Navigator initialRouteName="Home">
<BottomTabNavigator.Screen name="Home" component={StackNavigation}
<BottomTabNavigator.Screen name="Home" component={Home}
options={{
title: 'Home'
}}/>
<BottomTabNavigator.Screen name="CityList" component={CityList}
<BottomTabNavigator.Screen name="CityList" component={StackNavigation}
options={{
title: 'CityList',
}}/>

@ -1,6 +1,6 @@
import { View, Text, StyleSheet, TouchableHighlight } from "react-native"
import { FlatList } from "react-native-gesture-handler"
import { CITIES_DATA, City } from "../data/stub"
import { CITIES_DATA, City, getCurrentWeather } from "../data/stub"
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { VilleCompopo } from "../components/VilleCompopo";
import { TopBar } from "../components/TopBar";

@ -9,16 +9,11 @@ import { TopBar } from "../components/TopBar";
export default function Home(){
const insets = useSafeAreaInsets();
const statusBarHeight = insets.top;
const favoriteCity = FAVORITE_CITY_DATA;
return (
<View style={{alignItems: "center", marginTop: statusBarHeight}}>
<TopBar/>
<FlatList
data={CITIES_DATA}
keyExtractor={item =>item.name}
renderItem={({item}) => <VilleCompopo city={item}/>}
style={{width: "100%", alignSelf: "center"}}
/>
</View>
)
}

Loading…
Cancel
Save