Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions app/(tabs)/_layout.tsx

This file was deleted.

110 changes: 0 additions & 110 deletions app/(tabs)/explore.tsx

This file was deleted.

75 changes: 0 additions & 75 deletions app/(tabs)/index.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions app/+not-found.tsx

This file was deleted.

53 changes: 36 additions & 17 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,48 @@
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
import { useFonts } from 'expo-font';
import { Stack } from 'expo-router';
import { StatusBar } from 'expo-status-bar';
import 'react-native-reanimated';
import { Manrope_400Regular, Manrope_500Medium, Manrope_700Bold, useFonts } from "@expo-google-fonts/manrope";
import { SplashScreen, Stack } from "expo-router";
import { StatusBar } from "expo-status-bar";
import { useEffect } from "react";
import { useColorScheme } from "react-native";
import { AuthProvider } from "../context/AuthContext";
import { useProtectedRoute } from "../context/ProtectedRoute";

import { useColorScheme } from '@/hooks/useColorScheme';
function RootLayoutNav() {
// Use the route guard to protect routes
useProtectedRoute();

return (
<>
<StatusBar style="light" />
<Stack screenOptions={{
headerShown: false,
contentStyle: { backgroundColor: "#121712" }
}} />
</>
);
}

export default function RootLayout() {
const colorScheme = useColorScheme();
const [loaded] = useFonts({
SpaceMono: require('../assets/fonts/SpaceMono-Regular.ttf'),

const [fontsLoaded] = useFonts({
Manrope_400Regular,
Manrope_500Medium,
Manrope_700Bold,
});

if (!loaded) {
// Async font loading only occurs in development.
useEffect(() => {
if (fontsLoaded) {
SplashScreen.hideAsync();
}
}, [fontsLoaded]);

if (!fontsLoaded) {
return null;
}

return (
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="+not-found" />
</Stack>
<StatusBar style="auto" />
</ThemeProvider>
<AuthProvider>
<RootLayoutNav />
</AuthProvider>
);
}
12 changes: 12 additions & 0 deletions app/account/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Stack } from "expo-router";

export default function AccountLayout() {
return (
<Stack
screenOptions={{
headerShown: false,
contentStyle: { backgroundColor: "#121712" },
}}
/>
);
}
Loading