Added map screen + other stuff

This commit is contained in:
Alexis Leboeuf
2025-11-06 16:38:35 +01:00
parent 132c70e711
commit 6e2860318f
7 changed files with 103 additions and 29 deletions

View File

@@ -9,7 +9,8 @@
"userInterfaceStyle": "automatic", "userInterfaceStyle": "automatic",
"newArchEnabled": true, "newArchEnabled": true,
"ios": { "ios": {
"supportsTablet": true "supportsTablet": true,
"bundleIdentifier": "com.anonymous.mmmprojet"
}, },
"android": { "android": {
"adaptiveIcon": { "adaptiveIcon": {
@@ -19,7 +20,8 @@
"monochromeImage": "./assets/images/android-icon-monochrome.png" "monochromeImage": "./assets/images/android-icon-monochrome.png"
}, },
"edgeToEdgeEnabled": true, "edgeToEdgeEnabled": true,
"predictiveBackGestureEnabled": false "predictiveBackGestureEnabled": false,
"package": "com.anonymous.mmmprojet"
}, },
"web": { "web": {
"output": "static", "output": "static",

View File

@@ -7,7 +7,7 @@ import { HapticTab } from '@/components/haptic-tab';
import { IconSymbol } from '@/components/ui/icon-symbol'; import { IconSymbol } from '@/components/ui/icon-symbol';
import { Colors } from '@/constants/theme'; import { Colors } from '@/constants/theme';
import { useColorScheme } from '@/hooks/use-color-scheme'; import { useColorScheme } from '@/hooks/use-color-scheme';
import TabTwoScreen from './index'; import TabTwoScreen from './mapScreen';
import HomeScreen from './bonjourFL'; import HomeScreen from './bonjourFL';
const Tabs = createBottomTabNavigator(); const Tabs = createBottomTabNavigator();
@@ -31,14 +31,15 @@ export default function TabLayout() {
}} }}
/> />
<Tabs.Screen <Tabs.Screen
name="explore" name="mapScreen"
options={{ options={{
title: 'Explore', title: 'MapScreen',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />, tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
}} }}
> >
{() => <TabTwoScreen/>} {() => <TabTwoScreen/>}
</Tabs.Screen> </Tabs.Screen>
</Tabs.Navigator> </Tabs.Navigator>
); );
} }

View File

@@ -82,7 +82,7 @@ export default function BonjourScreen() {
/> />
<View style={styles.footer}> <View style={styles.footer}>
<Button title="Retour" onPress={() => router.back()} /> <Button title="Retour" onPress={() => router.push("/(tabs)/mapScreen") } />
</View> </View>
</View> </View>
) )

41
app/(tabs)/mapScreen.tsx Normal file
View File

@@ -0,0 +1,41 @@
// MapScreen.tsx
import React from 'react';
import { StyleSheet, View, Dimensions } from 'react-native';
import MapView, { Marker, PROVIDER_DEFAULT } from 'react-native-maps';
const MapScreen: React.FC = () => {
const region = {
latitude: 48.8566,
longitude: 2.3522,
latitudeDelta: 0.05,
longitudeDelta: 0.05,
};
return (
<View style={styles.container}>
<MapView
provider={PROVIDER_DEFAULT} // OpenStreetMap
style={styles.map}
region={region}
>
<Marker
coordinate={{ latitude: 48.8566, longitude: 2.3522 }}
title="Paris"
description="Capitale de la France"
/>
</MapView>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
map: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
},
});
export default MapScreen;

View File

@@ -1,19 +1,19 @@
[ [
{ {
"group": "Berurier Noir", "group": "Bernard DupYEEd",
"date":"20 Avril 1983", "date":"Rennes",
"nationality": "French", "nationality": "French",
"location": "Le Liberté", "location": "PlombYEEr",
"price": 20, "price": 20,
"ticketsLeft": 36, "ticketsLeft": 36,
"Image": "https://media.discordapp.net/attachments/1415267028201246812/1424825038657425518/a06e3304-86ca-4b4f-8016-c4ae9844b0df.png?ex=68e9f879&is=68e8a6f9&hm=b6ff1f540d5c382930b56bd6f90565f517ee179347d6ee6aebd5254b10cf4c88&=&format=webp&quality=lossless&width=579&height=579", "Image": "https://media.discordapp.net/attachments/1415267028201246812/1424825038657425518/a06e3304-86ca-4b4f-8016-c4ae9844b0df.png?ex=68e9f879&is=68e8a6f9&hm=b6ff1f540d5c382930b56bd6f90565f517ee179347d6ee6aebd5254b10cf4c88&=&format=webp&quality=lossless&width=579&height=579",
"favorite": false "favorite": false
}, },
{ {
"group": "Molodoi", "group": "MYEEchel Câble",
"date":"22 Avril 1983", "date":"Nantes",
"nationality": "French", "nationality": "French",
"location": "Le Liberté", "location": "ElectrYEEcien",
"price": 22, "price": 22,
"ticketsLeft": 400, "ticketsLeft": 400,
"Image": "https://media.discordapp.net/attachments/1415267028201246812/1424826240090509332/7fdbfe06-8300-441e-81ac-87851d004dc3.png?ex=68e9f997&is=68e8a817&hm=cc71621c3e7c3c1aaeda5555e9dd4204d43414cd0332c2b116b10d009b68df3c&=&format=webp&quality=lossless&width=579&height=579", "Image": "https://media.discordapp.net/attachments/1415267028201246812/1424826240090509332/7fdbfe06-8300-441e-81ac-87851d004dc3.png?ex=68e9f997&is=68e8a817&hm=cc71621c3e7c3c1aaeda5555e9dd4204d43414cd0332c2b116b10d009b68df3c&=&format=webp&quality=lossless&width=579&height=579",
@@ -21,21 +21,21 @@
}, },
{ {
"group": "Iggy Pop", "group": "PYEErre soulever",
"date":"24 Avril 1983", "date":"Redon",
"nationality": "French", "nationality": "French",
"location": "USA", "location": "GrutYEEr",
"price": 32, "price": 32,
"ticketsLeft": 0, "ticketsLeft": 0,
"Image": "https://static.fnac-static.com/multimedia/FR/Images_Produits/FR/fnac.com/Visual_Principal_340/2/2/8/0094633089822/tsp20130828210922/A-million-in-prizes-The-Iggy-Pop-Anthology.jpg", "Image": "https://media.discordapp.net/attachments/1425108443571945644/1427207643180826757/raw.png?ex=68ee0632&is=68ecb4b2&hm=1efc51065c6abfb1af75b8382f9924c2eb177c7d7672f7ed9837e96ef3076d16&=&format=webp&quality=lossless&width=233&height=350",
"favorite": false "favorite": false
}, },
{ {
"group": "Sex Pistols", "group": "Greg NegatYEEf",
"date":"23 Avril ", "date":"Pacé",
"nationality": "French", "nationality": "French",
"location": "", "location": "ElectrYEEcien",
"price": 20, "price": 20,
"ticketsLeft": 36, "ticketsLeft": 36,
"Image": "https://media.discordapp.net/attachments/1415267028201246812/1424826240090509332/7fdbfe06-8300-441e-81ac-87851d004dc3.png?ex=68e9f997&is=68e8a817&hm=cc71621c3e7c3c1aaeda5555e9dd4204d43414cd0332c2b116b10d009b68df3c&=&format=webp&quality=lossless&width=579&height=579", "Image": "https://media.discordapp.net/attachments/1415267028201246812/1424826240090509332/7fdbfe06-8300-441e-81ac-87851d004dc3.png?ex=68e9f997&is=68e8a817&hm=cc71621c3e7c3c1aaeda5555e9dd4204d43414cd0332c2b116b10d009b68df3c&=&format=webp&quality=lossless&width=579&height=579",

33
package-lock.json generated
View File

@@ -9,9 +9,9 @@
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@expo/vector-icons": "^15.0.2", "@expo/vector-icons": "^15.0.2",
"@react-navigation/bottom-tabs": "^7.4.0", "@react-navigation/bottom-tabs": "^7.4.8",
"@react-navigation/elements": "^2.6.3", "@react-navigation/elements": "^2.6.3",
"@react-navigation/native": "^7.1.8", "@react-navigation/native": "^7.1.18",
"expo": "~54.0.13", "expo": "~54.0.13",
"expo-constants": "~18.0.9", "expo-constants": "~18.0.9",
"expo-font": "~14.0.9", "expo-font": "~14.0.9",
@@ -28,6 +28,7 @@
"react-dom": "19.1.0", "react-dom": "19.1.0",
"react-native": "0.81.4", "react-native": "0.81.4",
"react-native-gesture-handler": "~2.28.0", "react-native-gesture-handler": "~2.28.0",
"react-native-maps": "1.20.1",
"react-native-reanimated": "~4.1.1", "react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0", "react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0", "react-native-screens": "~4.16.0",
@@ -3291,6 +3292,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/geojson": {
"version": "7946.0.16",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
"integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
"license": "MIT"
},
"node_modules/@types/graceful-fs": { "node_modules/@types/graceful-fs": {
"version": "4.1.9", "version": "4.1.9",
"resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
@@ -10663,6 +10670,28 @@
"react-native": "*" "react-native": "*"
} }
}, },
"node_modules/react-native-maps": {
"version": "1.20.1",
"resolved": "https://registry.npmjs.org/react-native-maps/-/react-native-maps-1.20.1.tgz",
"integrity": "sha512-NZI3B5Z6kxAb8gzb2Wxzu/+P2SlFIg1waHGIpQmazDSCRkNoHNY4g96g+xS0QPSaG/9xRBbDNnd2f2/OW6t6LQ==",
"license": "MIT",
"dependencies": {
"@types/geojson": "^7946.0.13"
},
"engines": {
"node": ">=18"
},
"peerDependencies": {
"react": ">= 17.0.1",
"react-native": ">= 0.64.3",
"react-native-web": ">= 0.11"
},
"peerDependenciesMeta": {
"react-native-web": {
"optional": true
}
}
},
"node_modules/react-native-reanimated": { "node_modules/react-native-reanimated": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-4.1.3.tgz", "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-4.1.3.tgz",

View File

@@ -5,16 +5,16 @@
"scripts": { "scripts": {
"start": "expo start", "start": "expo start",
"reset-project": "node ./scripts/reset-project.js", "reset-project": "node ./scripts/reset-project.js",
"android": "expo start --android", "android": "expo run:android",
"ios": "expo start --ios", "ios": "expo run:ios",
"web": "expo start --web", "web": "expo start --web",
"lint": "expo lint" "lint": "expo lint"
}, },
"dependencies": { "dependencies": {
"@expo/vector-icons": "^15.0.2", "@expo/vector-icons": "^15.0.2",
"@react-navigation/bottom-tabs": "^7.4.0", "@react-navigation/bottom-tabs": "^7.4.8",
"@react-navigation/elements": "^2.6.3", "@react-navigation/elements": "^2.6.3",
"@react-navigation/native": "^7.1.8", "@react-navigation/native": "^7.1.18",
"expo": "~54.0.13", "expo": "~54.0.13",
"expo-constants": "~18.0.9", "expo-constants": "~18.0.9",
"expo-font": "~14.0.9", "expo-font": "~14.0.9",
@@ -31,17 +31,18 @@
"react-dom": "19.1.0", "react-dom": "19.1.0",
"react-native": "0.81.4", "react-native": "0.81.4",
"react-native-gesture-handler": "~2.28.0", "react-native-gesture-handler": "~2.28.0",
"react-native-worklets": "0.5.1", "react-native-maps": "1.20.1",
"react-native-reanimated": "~4.1.1", "react-native-reanimated": "~4.1.1",
"react-native-safe-area-context": "~5.6.0", "react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0", "react-native-screens": "~4.16.0",
"react-native-web": "~0.21.0" "react-native-web": "~0.21.0",
"react-native-worklets": "0.5.1"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "~19.1.0", "@types/react": "~19.1.0",
"typescript": "~5.9.2",
"eslint": "^9.25.0", "eslint": "^9.25.0",
"eslint-config-expo": "~10.0.0" "eslint-config-expo": "~10.0.0",
"typescript": "~5.9.2"
}, },
"private": true "private": true
} }