Set device name in onboarding

This commit is contained in:
Maarten 2024-08-08 13:21:22 +02:00
parent 62fb347c90
commit 4536442b3c
3 changed files with 10 additions and 3 deletions

View file

@ -1,5 +1,7 @@
import { Stack } from 'expo-router'; import { Stack } from 'expo-router';
import { StyleSheet, TextInput, TouchableOpacity } from 'react-native'; import { StyleSheet, TextInput, TouchableOpacity } from 'react-native';
import { router } from 'expo-router';
import DeviceInfo from 'react-native-device-info';
import { ThemedText } from '@/components/ThemedText'; import { ThemedText } from '@/components/ThemedText';
import { ThemedView } from '@/components/ThemedView'; import { ThemedView } from '@/components/ThemedView';
@ -9,7 +11,6 @@ import React from 'react';
import { useColorScheme } from '@/hooks/useColorScheme'; import { useColorScheme } from '@/hooks/useColorScheme';
import { Message } from '@/services/message'; import { Message } from '@/services/message';
import { Request } from '@/services/request'; import { Request } from '@/services/request';
import { router } from 'expo-router';
export default function OnboardStartScreen() { export default function OnboardStartScreen() {
const colorScheme = useColorScheme() ?? 'light'; const colorScheme = useColorScheme() ?? 'light';
@ -25,8 +26,8 @@ export default function OnboardStartScreen() {
return; return;
} }
// TODO: Get device name // Get device name info
const deviceName = 'Test'; const deviceName = DeviceInfo.getModel();
Request Request
.post( 'sessions/create', { .post( 'sessions/create', {

View file

@ -40,6 +40,7 @@
"react-native": "0.74.3", "react-native": "0.74.3",
"react-native-autocomplete-dropdown": "3.1.5", "react-native-autocomplete-dropdown": "3.1.5",
"react-native-calendar-picker": "^8.0.0", "react-native-calendar-picker": "^8.0.0",
"react-native-device-info": "^11.1.0",
"react-native-gesture-handler": "~2.16.1", "react-native-gesture-handler": "~2.16.1",
"react-native-leaflet-view": "^0.1.2", "react-native-leaflet-view": "^0.1.2",
"react-native-modal": "^13.0.1", "react-native-modal": "^13.0.1",

View file

@ -7370,6 +7370,11 @@ react-native-calendar-picker@^8.0.0:
prop-types "^15.6.0" prop-types "^15.6.0"
recyclerlistview "^3.0.0" recyclerlistview "^3.0.0"
react-native-device-info@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-11.1.0.tgz#7db5c4e5a179dce761efac155a493aa0956a40ab"
integrity sha512-hzXJSObJdezEz0hF7MAJ3tGeoesuQWenXXt9mrQR9Mjb8kXpZ09rqSsZ/quNpJdZpQ3rYiFa3/0GFG5KNn9PBg==
react-native-feather@^1.1.2: react-native-feather@^1.1.2:
version "1.1.2" version "1.1.2"
resolved "https://registry.npmjs.org/react-native-feather/-/react-native-feather-1.1.2.tgz" resolved "https://registry.npmjs.org/react-native-feather/-/react-native-feather-1.1.2.tgz"