Initial commit

This commit is contained in:
2023-03-20 22:37:20 +01:00
parent 25d5321778
commit e54129908d
24 changed files with 8516 additions and 6996 deletions

29
app/_layout.tsx Normal file
View File

@@ -0,0 +1,29 @@
import { Stack } from "expo-router";
import { QueryClient, QueryClientProvider } from "react-query";
import Auth from "../components/Login";
import useAuthStore from "../stores/useAuthStore";
import Icon from "@expo/vector-icons/Feather";
const queryClient = new QueryClient();
function LogoutButton() {
const logout = useAuthStore((state) => state.logout);
return <Icon name="log-out" size={22} onPress={logout} />;
}
export default function Layout() {
const { isActive } = useAuthStore();
return (
<QueryClientProvider client={queryClient}>
{isActive ? (
<Stack
screenOptions={{ headerRight: LogoutButton, headerTitle: "PVERN" }}
initialRouteName="/test"
/>
) : (
<Auth />
)}
</QueryClientProvider>
);
}