- Enabled Add todo button and added navigation to the todos page on click

This commit is contained in:
Dejan
2024-11-18 17:11:39 +01:00
parent 0ba2cbd65d
commit d8e7dc6bf7
2 changed files with 8 additions and 9 deletions

View File

@ -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";

View File

@ -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 (
<ToDosContextProvider>
<>
@ -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={() => (
<CalendarIcon color={"white"} style={styles.btnIcon}/>
<CalendarIcon color="white" style={styles.btnIcon}/>
)}
/>
<Button
disabled
style={{
marginBottom: 10,
// backgroundColor: "#05a8b6",
backgroundColor: "#05a8b6",
justifyContent: "center",
width: "100%",
paddingVertical: 13,
opacity: 0.5
paddingVertical: 13
}}
label="Add To Do"
labelStyle={styles.btnLabel}
onPress={() => setChoreDialogVisible(true)}
onPress={() => navigation.navigate("todos")}
iconSource={() => (
<NavToDosIcon
color={"white"}
color="white"
width={23}
style={styles.btnIcon}
/>