mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
- Enabled Add todo button and added navigation to the todos page on click
This commit is contained in:
@ -4,7 +4,6 @@ import { useSetAtom } from "jotai";
|
|||||||
import CalendarPage from "@/components/pages/calendar/CalendarPage";
|
import CalendarPage from "@/components/pages/calendar/CalendarPage";
|
||||||
import { refreshTriggerAtom } from "@/components/pages/calendar/atoms";
|
import { refreshTriggerAtom } from "@/components/pages/calendar/atoms";
|
||||||
import { colorMap } from "@/constants/colorMap";
|
import { colorMap } from "@/constants/colorMap";
|
||||||
import { View } from "react-native-ui-lib";
|
|
||||||
import TabletCalendarPage from "@/components/pages/(tablet_pages)/calendar/TabletCalendarPage";
|
import TabletCalendarPage from "@/components/pages/(tablet_pages)/calendar/TabletCalendarPage";
|
||||||
import { DeviceType } from "expo-device";
|
import { DeviceType } from "expo-device";
|
||||||
import * as Device from "expo-device";
|
import * as Device from "expo-device";
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import NavToDosIcon from "@/assets/svgs/NavToDosIcon";
|
|||||||
import {useSetAtom} from "jotai";
|
import {useSetAtom} from "jotai";
|
||||||
import {selectedNewEventDateAtom} from "@/components/pages/calendar/atoms";
|
import {selectedNewEventDateAtom} from "@/components/pages/calendar/atoms";
|
||||||
import PlusIcon from "@/assets/svgs/PlusIcon";
|
import PlusIcon from "@/assets/svgs/PlusIcon";
|
||||||
|
import {useNavigation} from "expo-router";
|
||||||
|
|
||||||
export const AddEventDialog = () => {
|
export const AddEventDialog = () => {
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
@ -32,6 +33,7 @@ export const AddEventDialog = () => {
|
|||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const navigation = useNavigation()
|
||||||
return (
|
return (
|
||||||
<ToDosContextProvider>
|
<ToDosContextProvider>
|
||||||
<>
|
<>
|
||||||
@ -82,7 +84,7 @@ export const AddEventDialog = () => {
|
|||||||
paddingVertical: 13,
|
paddingVertical: 13,
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
}}
|
}}
|
||||||
label="Scan Image"
|
label="Upload Image"
|
||||||
labelStyle={styles.btnLabel}
|
labelStyle={styles.btnLabel}
|
||||||
onPress={handleScanImageDialog}
|
onPress={handleScanImageDialog}
|
||||||
iconSource={() => (
|
iconSource={() => (
|
||||||
@ -102,26 +104,24 @@ export const AddEventDialog = () => {
|
|||||||
labelStyle={styles.btnLabel}
|
labelStyle={styles.btnLabel}
|
||||||
onPress={handleOpenManualInputModal}
|
onPress={handleOpenManualInputModal}
|
||||||
iconSource={() => (
|
iconSource={() => (
|
||||||
<CalendarIcon color={"white"} style={styles.btnIcon}/>
|
<CalendarIcon color="white" style={styles.btnIcon}/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
disabled
|
|
||||||
style={{
|
style={{
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
// backgroundColor: "#05a8b6",
|
backgroundColor: "#05a8b6",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
paddingVertical: 13,
|
paddingVertical: 13
|
||||||
opacity: 0.5
|
|
||||||
}}
|
}}
|
||||||
label="Add To Do"
|
label="Add To Do"
|
||||||
labelStyle={styles.btnLabel}
|
labelStyle={styles.btnLabel}
|
||||||
onPress={() => setChoreDialogVisible(true)}
|
onPress={() => navigation.navigate("todos")}
|
||||||
iconSource={() => (
|
iconSource={() => (
|
||||||
<NavToDosIcon
|
<NavToDosIcon
|
||||||
color={"white"}
|
color="white"
|
||||||
width={23}
|
width={23}
|
||||||
style={styles.btnIcon}
|
style={styles.btnIcon}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user