Jkdsjkdjw

This commit is contained in:
2026-04-25 11:21:39 +02:00
parent 72b45335dd
commit 928db54b3e
6 changed files with 60 additions and 41 deletions

View File

@@ -1,18 +1,5 @@
import { Stack, useRouter } from "expo-router";
import { useAuth } from "@/context/auth-context";
import { useEffect } from "react";
import { Stack } from "expo-router";
export default function AuthLayout() {
const { user } = useAuth();
const router = useRouter();
useEffect(() => {
if (user) {
router.replace("/(tabs)");
} else {
router.replace("/(auth)/login");
}
}, [user]);
return <Stack />;
}
return <Stack screenOptions={{ headerShown: false }} />;
}

View File

@@ -48,7 +48,7 @@ function LoginScreen({ onSwitch }) {
</TouchableOpacity>
<TouchableOpacity onPress={onSwitch}>
<Text style={styles.link}>Don't have an account? Register</Text>
<Text style={styles.link}>Don&apos;t have an account? Register</Text>
</TouchableOpacity>
</View>
);
@@ -142,4 +142,4 @@ const styles = StyleSheet.create({
textAlign: "center",
color: "#007BFF",
},
});
});