Edit name + address for session

This commit is contained in:
Maarten 2024-08-08 13:13:39 +02:00
parent f9a78a5c37
commit fe82b69997
8 changed files with 419 additions and 70 deletions

View file

@ -1,5 +1,6 @@
import React, {useEffect, useState} from 'react';
import {StyleSheet, ScrollView, SafeAreaView, View, StatusBar, TouchableOpacity, Image} from 'react-native';
// @ts-ignore
import CalendarPicker from 'react-native-calendar-picker';
import Ionicons from '@expo/vector-icons/Ionicons';
@ -10,9 +11,11 @@ import {useColorScheme} from '@/hooks/useColorScheme';
import {useToken} from '@/context/AppProvider';
import {Request} from '@/services/request';
import List from '@/components/List';
import { useIsFocused } from '@react-navigation/core';
export default function HomeScreen() {
const colorScheme = useColorScheme() ?? 'light';
const isFocused = useIsFocused();
const {token, isLoading} = useToken();
const [name, setName] = useState(' '); // Default empty space to prevent layout shifting
const [dates, setDates] = useState<any | null>([]);
@ -42,7 +45,7 @@ export default function HomeScreen() {
}
})
}
}, [token]);
}, [isFocused]);
return (
<SafeAreaView style={{flex: 1, backgroundColor: Colors[colorScheme].background,}}>