You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
4.2 KiB

{"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"}