Commit 3d1923ea authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se agregó el contexto de audio a la aplicación

parent fcf97c10
Loading
Loading
Loading
Loading
+35 −9
Original line number Diff line number Diff line
@@ -4,13 +4,16 @@ import { LIGTHT_THEME } from "../src/constants/theme";
import { AuthContextProvider, useAuth } from "../src/contexts/auth_context";
import { ActivityIndicator } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { AudioContextProvider } from "../src/contexts/audio_context";

export default function Root() {
  return (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <DataContextProvider>
        <AuthContextProvider>
          <AudioContextProvider>
            <MainLayout />
          </AudioContextProvider>
        </AuthContextProvider>
      </DataContextProvider>
    </GestureHandlerRootView>
@@ -26,7 +29,13 @@ const MainLayout = () => {

  return (
    <Stack initialRouteName="(tabs)">
      <Stack.Screen name="(tabs)" options={{ headerShown: false, statusBarColor: LIGTHT_THEME.color.primary }} />
      <Stack.Screen
        name="(tabs)"
        options={{
          headerShown: false,
          statusBarColor: LIGTHT_THEME.color.primary,
        }}
      />
      <Stack.Screen
        name="state"
        options={{
@@ -43,11 +52,9 @@ const MainLayout = () => {
      />
      <Stack.Screen
        name="sign_up"
        options = {
          {
            headerShown: false
          }
        }
        options={{
          headerShown: false,
        }}
      />
      <Stack.Screen
        name="profile"
@@ -56,6 +63,25 @@ const MainLayout = () => {
          headerShown: false,
        }}
      />
      <Stack.Screen
        name="scan"
        options={{
          title: "Scan",
          statusBarColor: LIGTHT_THEME.color.primary,
          headerStyle: {
            backgroundColor: LIGTHT_THEME.color.primary,
          },
          headerTitleStyle: {
            color: LIGTHT_THEME.color.white,
          },
          headerTitleAlign: "center",
          headerTintColor: LIGTHT_THEME.color.white,
        }}
      />
      <Stack.Screen name="travel_history" options={{
        headerShown: false,
        statusBarColor: LIGTHT_THEME.color.primary,
      }}/>
    </Stack>
  );
};