mirror of
https://github.com/urosran/cally.git
synced 2026-10-25 19:27:54 +00:00
70 lines
2.0 KiB
TypeScript
70 lines
2.0 KiB
TypeScript
import React from 'react';
|
|
import {Drawer} from "expo-router/drawer";
|
|
import {useSignOut} from "@/hooks/firebase/useSignOut";
|
|
import {DrawerContentScrollView, DrawerItem, DrawerItemList} from "@react-navigation/drawer";
|
|
|
|
export default function TabLayout() {
|
|
const {mutateAsync: signOut} = useSignOut()
|
|
|
|
return (
|
|
<Drawer
|
|
initialRouteName={"index"}
|
|
screenOptions={{
|
|
headerShown: true,
|
|
}}
|
|
drawerContent={props => {
|
|
return (
|
|
<DrawerContentScrollView {...props}>
|
|
<DrawerItemList {...props} />
|
|
<DrawerItem label="Logout" onPress={() => signOut()}/>
|
|
</DrawerContentScrollView>
|
|
)
|
|
}}
|
|
>
|
|
<Drawer.Screen
|
|
name="index"
|
|
options={{
|
|
drawerLabel: "Calendar",
|
|
title: "Calendar",
|
|
}}
|
|
/>
|
|
<Drawer.Screen
|
|
name="calendar"
|
|
options={{
|
|
drawerLabel: "Calendar",
|
|
title: "Calendar",
|
|
drawerItemStyle: {display: "none"}
|
|
}}
|
|
/>
|
|
<Drawer.Screen
|
|
name="brain_dump"
|
|
options={{
|
|
drawerLabel: "Brain Dump",
|
|
title: "Brain Dump",
|
|
}}
|
|
/>
|
|
<Drawer.Screen
|
|
name="grocery"
|
|
options={{
|
|
drawerLabel: "Grocery",
|
|
title: "Grocery",
|
|
}}
|
|
/>
|
|
<Drawer.Screen
|
|
name="reminders"
|
|
options={{
|
|
drawerLabel: "Reminders",
|
|
title: "Reminders",
|
|
}}
|
|
/>
|
|
<Drawer.Screen
|
|
name="todos"
|
|
options={{
|
|
drawerLabel: "To-Do",
|
|
title: "To-Do",
|
|
}}
|
|
/>
|
|
</Drawer>
|
|
);
|
|
}
|