forked from fr/deguapp
		
	Added biome for formatting, code formatted
This commit is contained in:
		@@ -4,19 +4,19 @@ import { useAuth } from "../context/AuthContext";
 | 
			
		||||
import { View, Text } from "react-native";
 | 
			
		||||
 | 
			
		||||
export default function AppLayout() {
 | 
			
		||||
  const { authState } = useAuth();
 | 
			
		||||
	const { authState } = useAuth();
 | 
			
		||||
 | 
			
		||||
  if (authState.authenticated === null) {
 | 
			
		||||
    // micro loading co neni skoro videt ale get the fuck out se uz neloguje
 | 
			
		||||
    return (
 | 
			
		||||
      <View>
 | 
			
		||||
        <Text>Loading...</Text>
 | 
			
		||||
      </View>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
  if (!authState.authenticated) {
 | 
			
		||||
    console.log("get the fuck out");
 | 
			
		||||
    return <Redirect href="/login" />;
 | 
			
		||||
  }
 | 
			
		||||
  return <Stack />;
 | 
			
		||||
	if (authState.authenticated === null) {
 | 
			
		||||
		// micro loading co neni skoro videt ale get the fuck out se uz neloguje
 | 
			
		||||
		return (
 | 
			
		||||
			<View>
 | 
			
		||||
				<Text>Loading...</Text>
 | 
			
		||||
			</View>
 | 
			
		||||
		);
 | 
			
		||||
	}
 | 
			
		||||
	if (!authState.authenticated) {
 | 
			
		||||
		console.log("get the fuck out");
 | 
			
		||||
		return <Redirect href="/login" />;
 | 
			
		||||
	}
 | 
			
		||||
	return <Stack />;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,21 +3,21 @@ import { Text, View } from "react-native";
 | 
			
		||||
import { useAuth } from "../context/AuthContext";
 | 
			
		||||
 | 
			
		||||
export default function Index() {
 | 
			
		||||
  const { onLogout, authState } = useAuth();
 | 
			
		||||
	const { onLogout, authState } = useAuth();
 | 
			
		||||
 | 
			
		||||
  const user = authState.user;
 | 
			
		||||
	const user = authState.user;
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
 | 
			
		||||
      <Text>Welcome {user.username}</Text>
 | 
			
		||||
      <Text
 | 
			
		||||
        onPress={() => {
 | 
			
		||||
          // The `app/(app)/_layout.tsx` will redirect to the sign-in screen.
 | 
			
		||||
          onLogout();
 | 
			
		||||
        }}
 | 
			
		||||
      >
 | 
			
		||||
        Sign Out
 | 
			
		||||
      </Text>
 | 
			
		||||
    </View>
 | 
			
		||||
  );
 | 
			
		||||
	return (
 | 
			
		||||
		<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
 | 
			
		||||
			<Text>Welcome {user.username}</Text>
 | 
			
		||||
			<Text
 | 
			
		||||
				onPress={() => {
 | 
			
		||||
					// The `app/(app)/_layout.tsx` will redirect to the sign-in screen.
 | 
			
		||||
					onLogout();
 | 
			
		||||
				}}
 | 
			
		||||
			>
 | 
			
		||||
				Sign Out
 | 
			
		||||
			</Text>
 | 
			
		||||
		</View>
 | 
			
		||||
	);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user