Add files via upload
This commit is contained in:
parent
ddac17c6c5
commit
5f4e59b56b
6 changed files with 29 additions and 27 deletions
|
|
@ -60,9 +60,9 @@ export default function HomeScreen() {
|
|||
load();
|
||||
}, []);
|
||||
|
||||
useFocusEffect(() => {
|
||||
useFocusEffect(useCallback(() => {
|
||||
loadDownloadedTracks();
|
||||
});
|
||||
}, [loadDownloadedTracks]));
|
||||
|
||||
const onRefresh = async () => {
|
||||
setRefresh(true);
|
||||
|
|
|
|||
|
|
@ -5,21 +5,7 @@ import { StatusBar } from 'expo-status-bar';
|
|||
import { useBootAuth } from '../hooks/useAuth';
|
||||
import { Colors } from '../constants/theme';
|
||||
|
||||
export default function RootLayout() {
|
||||
useBootAuth();
|
||||
useOTAUpdates();
|
||||
|
||||
return (
|
||||
<GestureHandlerRootView style={{ flex: 1, backgroundColor: Colors.bg }}>
|
||||
<StatusBar style="light" />
|
||||
<Stack screenOptions={{ headerShown: false, contentStyle: { backgroundColor: Colors.bg } }}>
|
||||
<Stack.Screen name="(tabs)" />
|
||||
<Stack.Screen name="auth" options={{ presentation: 'fullScreenModal' }} />
|
||||
</Stack>
|
||||
</GestureHandlerRootView>
|
||||
);
|
||||
}
|
||||
|
||||
// Must be defined before use — hooks are not hoisted
|
||||
function useOTAUpdates() {
|
||||
useEffect(() => {
|
||||
if (__DEV__) return;
|
||||
|
|
@ -38,3 +24,18 @@ function useOTAUpdates() {
|
|||
})();
|
||||
}, []);
|
||||
}
|
||||
|
||||
export default function RootLayout() {
|
||||
useBootAuth();
|
||||
useOTAUpdates();
|
||||
|
||||
return (
|
||||
<GestureHandlerRootView style={{ flex: 1, backgroundColor: Colors.bg }}>
|
||||
<StatusBar style="light" />
|
||||
<Stack screenOptions={{ headerShown: false, contentStyle: { backgroundColor: Colors.bg } }}>
|
||||
<Stack.Screen name="(tabs)" />
|
||||
<Stack.Screen name="auth" options={{ presentation: 'fullScreenModal' }} />
|
||||
</Stack>
|
||||
</GestureHandlerRootView>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue