Commit e8dc15fd authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

ss

parent ab5f0137
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -45,14 +45,6 @@ const MainLayout = () => {
    console.log("Profile Loading: ", profileLoading);
  }, [isLoading, profileLoading]);

  if (isLoading || profileLoading) {
    return (
      <ActivityIndicator
        color={isLoading ? "red" : profileLoading ? "blue" : "green"}
      />
    );
  }

  return (
    <Stack initialRouteName="(tabs)">
      <Stack.Screen
+8 −0
Original line number Diff line number Diff line
@@ -106,6 +106,14 @@ export const AuthContextProvider = ({ children }: AuthContextProviderProps) => {

  useEffect(() => {
    checkSession();

    const timeout = setTimeout(() => {
      if (isLoading) {
        setIsLoading(false);
      }
    }, 3000);

    return () => clearTimeout(timeout);
  }, []);

  return (