From c08fbb762ac76edcf02819a0d97bd749841cde34 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Mon, 9 Dec 2024 18:29:48 +0100 Subject: [PATCH] =?UTF-8?q?Installation=20de=20expo-secure-store=20pour=20?= =?UTF-8?q?stocker=20les=20donn=C3=A9es=20de=20connexion=20=C3=A0=20l'API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/app.json | 3 ++- client/app/(tabs)/_layout.tsx | 8 ++++++++ client/app/(tabs)/settings.tsx | 15 +++++++++++++++ client/components/Map.tsx | 2 +- client/package-lock.json | 10 ++++++++++ client/package.json | 3 ++- 6 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 client/app/(tabs)/settings.tsx diff --git a/client/app.json b/client/app.json index e7aa572..010ada8 100644 --- a/client/app.json +++ b/client/app.json @@ -43,7 +43,8 @@ "locationAlwaysAndWhenInUsePermission": "Allow $(PRODUCT_NAME) to use your location." } ], - "expo-task-manager" + "expo-task-manager", + "expo-secure-store" ], "experiments": { "typedRoutes": true diff --git a/client/app/(tabs)/_layout.tsx b/client/app/(tabs)/_layout.tsx index a821782..1e87488 100644 --- a/client/app/(tabs)/_layout.tsx +++ b/client/app/(tabs)/_layout.tsx @@ -45,6 +45,14 @@ export default function TabLayout() { tabBarIcon: ({ color }) => , }} /> + , + }} + /> ) } diff --git a/client/app/(tabs)/settings.tsx b/client/app/(tabs)/settings.tsx new file mode 100644 index 0000000..90dd015 --- /dev/null +++ b/client/app/(tabs)/settings.tsx @@ -0,0 +1,15 @@ +import { FlatList, ScrollView } from 'react-native' +import { ThemedText } from '@/components/ThemedText' +import { ThemedView } from '@/components/ThemedView' +// import * as SecureStore from 'expo-secure-store' + +export default function HistoryScreen() { + // const token = SecureStore.getItem("apiToken") + return ( + + + {item}} /> + + + ) +} diff --git a/client/components/Map.tsx b/client/components/Map.tsx index f1f638b..a598b91 100644 --- a/client/components/Map.tsx +++ b/client/components/Map.tsx @@ -10,7 +10,7 @@ export default function Map() { const accuracyCircle = circle([userLocation?.coords.longitude ?? 0, userLocation?.coords.latitude ?? 0], userLocation?.coords.accuracy ?? 0, {steps: 64, units: 'meters'}) return ( {/* FIXME Il faudra pouvoir avoir un bouton de suivi pour activer le suivi de la caméro */} diff --git a/client/package-lock.json b/client/package-lock.json index 02695f8..06db72f 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -23,6 +23,7 @@ "expo-linking": "~7.0.3", "expo-location": "^18.0.2", "expo-router": "~4.0.9", + "expo-secure-store": "~14.0.0", "expo-splash-screen": "~0.29.13", "expo-status-bar": "~2.0.0", "expo-symbols": "~0.2.0", @@ -7817,6 +7818,15 @@ "node": ">=10" } }, + "node_modules/expo-secure-store": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/expo-secure-store/-/expo-secure-store-14.0.0.tgz", + "integrity": "sha512-VyhtRFXP+7hQmHhKlHIOWid1Q/IRpM7Uif32tZHLZHvQ6FNz2cUkr26XWGvCa7btYbrR6OL++FBFZYjbIcRZTw==", + "license": "MIT", + "peerDependencies": { + "expo": "*" + } + }, "node_modules/expo-splash-screen": { "version": "0.29.13", "resolved": "https://registry.npmjs.org/expo-splash-screen/-/expo-splash-screen-0.29.13.tgz", diff --git a/client/package.json b/client/package.json index bcea19a..b8cf046 100644 --- a/client/package.json +++ b/client/package.json @@ -47,7 +47,8 @@ "react-native-screens": "~4.1.0", "react-native-web": "~0.19.13", "react-native-webview": "13.12.2", - "react-redux": "^9.1.2" + "react-redux": "^9.1.2", + "expo-secure-store": "~14.0.0" }, "devDependencies": { "@babel/core": "^7.25.2",