fix login check and urls
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
import { DrawerItem } from "@react-navigation/drawer";
|
||||
import { Drawer } from "expo-router/drawer";
|
||||
import { useAuthStore } from "@/store/authStore";
|
||||
|
||||
import {
|
||||
DrawerContentScrollView,
|
||||
DrawerItemList,
|
||||
} from "@react-navigation/drawer";
|
||||
|
||||
export default function AccountDrawerLayout() {
|
||||
const signOut = useAuthStore((state) => state.signOut);
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
screenOptions={{
|
||||
@@ -9,10 +18,19 @@ export default function AccountDrawerLayout() {
|
||||
drawerActiveBackgroundColor: "#f0f0f0",
|
||||
drawerItemStyle: {
|
||||
borderRadius: 8,
|
||||
// backgroundColor: "transparent",
|
||||
},
|
||||
headerTintColor: "#1c1c1e",
|
||||
}}
|
||||
drawerContent={(props) => (
|
||||
<DrawerContentScrollView {...props}>
|
||||
<DrawerItemList {...props} />
|
||||
<DrawerItem
|
||||
label="Wyloguj"
|
||||
onPress={signOut}
|
||||
labelStyle={{ color: "red" }}
|
||||
/>
|
||||
</DrawerContentScrollView>
|
||||
)}
|
||||
>
|
||||
<Drawer.Screen name="account" options={{ title: "Konto" }} />
|
||||
<Drawer.Screen
|
||||
|
||||
Reference in New Issue
Block a user