From d8e7dc6bf74cfe49d0067f7a166333400a726592 Mon Sep 17 00:00:00 2001 From: Dejan Date: Mon, 18 Nov 2024 17:11:39 +0100 Subject: [PATCH] - Enabled Add todo button and added navigation to the todos page on click --- app/(auth)/calendar/index.tsx | 1 - components/pages/calendar/AddEventDialog.tsx | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/(auth)/calendar/index.tsx b/app/(auth)/calendar/index.tsx index e8120f2..d6f095b 100644 --- a/app/(auth)/calendar/index.tsx +++ b/app/(auth)/calendar/index.tsx @@ -4,7 +4,6 @@ import { useSetAtom } from "jotai"; import CalendarPage from "@/components/pages/calendar/CalendarPage"; import { refreshTriggerAtom } from "@/components/pages/calendar/atoms"; import { colorMap } from "@/constants/colorMap"; -import { View } from "react-native-ui-lib"; import TabletCalendarPage from "@/components/pages/(tablet_pages)/calendar/TabletCalendarPage"; import { DeviceType } from "expo-device"; import * as Device from "expo-device"; diff --git a/components/pages/calendar/AddEventDialog.tsx b/components/pages/calendar/AddEventDialog.tsx index 1eab83d..e6aa012 100644 --- a/components/pages/calendar/AddEventDialog.tsx +++ b/components/pages/calendar/AddEventDialog.tsx @@ -11,6 +11,7 @@ import NavToDosIcon from "@/assets/svgs/NavToDosIcon"; import {useSetAtom} from "jotai"; import {selectedNewEventDateAtom} from "@/components/pages/calendar/atoms"; import PlusIcon from "@/assets/svgs/PlusIcon"; +import {useNavigation} from "expo-router"; export const AddEventDialog = () => { const [show, setShow] = useState(false); @@ -32,6 +33,7 @@ export const AddEventDialog = () => { }, 100); }; + const navigation = useNavigation() return ( <> @@ -82,7 +84,7 @@ export const AddEventDialog = () => { paddingVertical: 13, opacity: 0.5 }} - label="Scan Image" + label="Upload Image" labelStyle={styles.btnLabel} onPress={handleScanImageDialog} iconSource={() => ( @@ -102,26 +104,24 @@ export const AddEventDialog = () => { labelStyle={styles.btnLabel} onPress={handleOpenManualInputModal} iconSource={() => ( - + )} />