diff --git a/app/(auth)/_layout.tsx b/app/(auth)/_layout.tsx
index 5cc7782..17ef772 100644
--- a/app/(auth)/_layout.tsx
+++ b/app/(auth)/_layout.tsx
@@ -1,12 +1,69 @@
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() {
- return (
-
- );
+ const {mutateAsync: signOut} = useSignOut()
+
+ return (
+ {
+ return (
+
+
+ signOut()}/>
+
+ )
+ }}
+ >
+
+
+
+
+
+
+
+ );
}
diff --git a/app/(auth)/calendar/index.tsx b/app/(auth)/calendar/index.tsx
index 7d92969..c13e298 100644
--- a/app/(auth)/calendar/index.tsx
+++ b/app/(auth)/calendar/index.tsx
@@ -1,7 +1,123 @@
-import {View} from "react-native-ui-lib";
+import React, {useRef, useState} from "react";
+import {LayoutChangeEvent} from "react-native";
+import {Calendar} from "react-native-big-calendar";
+import {Button, Picker, PickerModes, SegmentedControl, Text, View} from "react-native-ui-lib";
+import {MaterialIcons} from "@expo/vector-icons";
+import {AddEventDialog} from "@/components/pages/calendar/AddEventDialog";
+import {useGetEvents} from "@/hooks/firebase/useGetEvents";
+
+const modeMap = new Map([
+ [0, "day"],
+ [1, "week"],
+ [2, "month"]
+]);
+
+const months = [
+ "January", "February", "March", "April", "May", "June",
+ "July", "August", "September", "October", "November", "December"
+];
export default function Screen() {
+ const [calendarHeight, setCalendarHeight] = useState(0);
+ const [mode, setMode] = useState<"week" | "month" | "day">("week");
+ const [selectedDate, setSelectedDate] = useState(new Date());
+
+ const calendarContainerRef = useRef(null);
+ const { data: events} = useGetEvents()
+
+ const onLayout = (event: LayoutChangeEvent) => {
+ const {height} = event.nativeEvent.layout;
+ setCalendarHeight(height);
+ };
+
+ const handleSegmentChange = (index: number) => {
+ const selectedMode = modeMap.get(index);
+ if (selectedMode) {
+ setMode(selectedMode as "week" | "month" | "day");
+ }
+ };
+
+ const handleMonthChange = (month: string) => {
+ const currentYear = selectedDate.getFullYear();
+ const currentDay = selectedDate.getDate();
+ const newMonthIndex = months.indexOf(month);
+
+ // Update the date with the new month while preserving the day and year
+ const updatedDate = new Date(currentYear, newMonthIndex, currentDay);
+ setSelectedDate(updatedDate);
+ };
+
+ console.log(events)
+
return (
-
- )
-}
\ No newline at end of file
+
+
+ Welcome Dalia
+ Let's get your week started!
+
+
+
+
+ handleMonthChange(itemValue as string)}
+ trailingAccessory={}
+ >
+ {months.map((month) => (
+
+ ))}
+
+
+
+ value === mode)?.[0] || 1}
+ />
+
+
+
+ {calendarHeight > 0 && (
+ {
+ console.log(newDate)
+ setSelectedDate(newDate);
+ }}
+ />
+ )}
+
+
+
+
+ );
+}
diff --git a/app/(auth)/index.tsx b/app/(auth)/index.tsx
index 324aeb7..ac3735e 100644
--- a/app/(auth)/index.tsx
+++ b/app/(auth)/index.tsx
@@ -1,70 +1,3 @@
-import { Image, StyleSheet, Platform } from 'react-native';
+import Screen from "@/app/(auth)/calendar";
-import { HelloWave } from '@/components/HelloWave';
-import ParallaxScrollView from '@/components/ParallaxScrollView';
-import { ThemedText } from '@/components/ThemedText';
-import { ThemedView } from '@/components/ThemedView';
-
-export default function HomeScreen() {
- return (
-
- }>
-
- Welcome!
-
-
-
- Step 1: Try it
-
- Edit app/(tabs)/index.tsx to see changes.
- Press{' '}
-
- {Platform.select({ ios: 'cmd + d', android: 'cmd + m' })}
- {' '}
- to open developer tools.
-
-
-
- Step 2: Explore
-
- Tap the Explore tab to learn more about what's included in this starter app.
-
-
-
- Step 3: Get a fresh start
-
- When you're ready, run{' '}
- npm run reset-project to get a fresh{' '}
- app directory. This will move the current{' '}
- app to{' '}
- app-example.
-
-
-
- );
-}
-
-const styles = StyleSheet.create({
- titleContainer: {
- flexDirection: 'row',
- alignItems: 'center',
- gap: 8,
- },
- stepContainer: {
- gap: 8,
- marginBottom: 8,
- },
- reactLogo: {
- height: 178,
- width: 290,
- bottom: 0,
- left: 0,
- position: 'absolute',
- },
-});
+export default Screen
\ No newline at end of file
diff --git a/app/(auth)/main/_layout.tsx b/app/(auth)/main/_layout.tsx
deleted file mode 100644
index 0990eb8..0000000
--- a/app/(auth)/main/_layout.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import {Stack} from "expo-router";
-
-export default function StackLayout () {
- return
-}
\ No newline at end of file
diff --git a/app/(auth)/main/index.tsx b/app/(auth)/main/index.tsx
deleted file mode 100644
index 81f662a..0000000
--- a/app/(auth)/main/index.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import React, { useEffect, useState } from "react";
-import { Button, TextInput } from "react-native";
-import { Checkbox, Picker, TextField, View, Text } from "react-native-ui-lib";
-import { useCreateSubUser } from "@/hooks/firebase/useCreateSubUser";
-import { UserProfile } from "@/hooks/firebase/types/profileTypes";
-import { uuidv4 } from "@firebase/util";
-import { useGetChildrenByParentId } from "@/hooks/firebase/useGetChildrenByParentId";
-import { ProfileType, useAuthContext } from "@/contexts/AuthContext";
-import SignInPage from "../../../components/pages/main/SignInPage";
-import Entry from "@/components/pages/main/Entry";
-import { useSignUp } from "@/hooks/firebase/useSignUp";
-import { useSignOut } from "@/hooks/firebase/useSignOut";
-
-const Screen: React.FC = () => {
- const { user, profileType, profileData } = useAuthContext();
-
- const { data: children } = useGetChildrenByParentId();
-
- const { mutateAsync: createSubUser } = useCreateSubUser();
- const { mutateAsync: signOut } = useSignOut();
-
- const createNewSubUser = async (userProfile: UserProfile) => {
- await createSubUser({ ...userProfile, email: `${uuidv4()}@test.com` });
- // createSubUser({
- // email,
- // password,
- // userType: profileType!,
- // name: "",
- // contact: "+381628334",
- // ...child
- // })
- };
-
- return (
-
- {user ? (
-
- {profileType === ProfileType.PARENT && Parent}
- {profileType === ProfileType.CHILD && Child}
- {profileType === ProfileType.CAREGIVER && Caregiver}
-
- ) : (
-
- )}
-
- );
-};
-
-export default Screen;
diff --git a/app/(unauth)/_layout.tsx b/app/(unauth)/_layout.tsx
index e69de29..e411d3d 100644
--- a/app/(unauth)/_layout.tsx
+++ b/app/(unauth)/_layout.tsx
@@ -0,0 +1,5 @@
+import {Stack} from "expo-router";
+
+export default function Layout() {
+ return
+}
\ No newline at end of file
diff --git a/app/(unauth)/index.tsx b/app/(unauth)/index.tsx
new file mode 100644
index 0000000..cb2ba03
--- /dev/null
+++ b/app/(unauth)/index.tsx
@@ -0,0 +1,7 @@
+import Entry from "@/components/pages/main/Entry";
+
+export default function Screen() {
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/app/(unauth)/login.tsx b/app/(unauth)/login.tsx
deleted file mode 100644
index e69de29..0000000
diff --git a/app/(unauth)/register.tsx b/app/(unauth)/register.tsx
deleted file mode 100644
index e69de29..0000000
diff --git a/app/+not-found.tsx b/app/+not-found.tsx
index 963b04f..c8a4db7 100644
--- a/app/+not-found.tsx
+++ b/app/+not-found.tsx
@@ -1,15 +1,16 @@
-import { Link, Stack } from 'expo-router';
+import {Link, Stack, usePathname} from 'expo-router';
import { StyleSheet } from 'react-native';
import { ThemedText } from '@/components/ThemedText';
import { ThemedView } from '@/components/ThemedView';
export default function NotFoundScreen() {
+ const route = usePathname()
return (
<>
- This screen doesn't exist.
+ This screen doesn't exist. ({route})
Go to home screen!
diff --git a/components/pages/calendar/AddEventDialog.tsx b/components/pages/calendar/AddEventDialog.tsx
new file mode 100644
index 0000000..02be196
--- /dev/null
+++ b/components/pages/calendar/AddEventDialog.tsx
@@ -0,0 +1,89 @@
+import React, {useState} from "react";
+import {MaterialIcons} from "@expo/vector-icons";
+import {Button, Card, Dialog, PanningProvider, Text, View} from "react-native-ui-lib";
+import {TouchableOpacity} from "react-native";
+import {ManuallyAddEventModal} from "@/components/pages/calendar/ManuallyAddEventModal";
+
+export const AddEventDialog = () => {
+ const [show, setShow] = useState(false);
+ const [showManualInputModal, setShowManualInputModal] = useState(false);
+
+ const handleOpenManualInputModal = () => {
+ setShow(false);
+ setTimeout(() => {
+ setShowManualInputModal(true);
+ }, 500);
+ };
+
+ return (
+ <>
+