diff --git a/components/pages/calendar/ManuallyAddEventModal.tsx b/components/pages/calendar/ManuallyAddEventModal.tsx index b5df5a9..f826e48 100644 --- a/components/pages/calendar/ManuallyAddEventModal.tsx +++ b/components/pages/calendar/ManuallyAddEventModal.tsx @@ -21,7 +21,6 @@ import { AntDesign, Feather, Ionicons } from "@expo/vector-icons"; import { PickerMultiValue } from "react-native-ui-lib/src/components/picker/types"; import { useCreateEvent } from "@/hooks/firebase/useCreateEvent"; import { EventData } from "@/hooks/firebase/types/eventData"; -import { addHours } from "date-fns"; import DropModalIcon from "@/assets/svgs/DropModalIcon"; import { StyleSheet } from "react-native"; import ClockIcon from "@/assets/svgs/ClockIcon"; @@ -29,7 +28,7 @@ import LockIcon from "@/assets/svgs/LockIcon"; import MenuIcon from "@/assets/svgs/MenuIcon"; import CameraIcon from "@/assets/svgs/CameraIcon"; import AssigneesDisplay from "@/components/shared/AssigneesDisplay"; -import { useAtom, useAtomValue } from "jotai"; +import { useAtom } from "jotai"; import { eventForEditAtom, selectedNewEventDateAtom, @@ -72,6 +71,7 @@ export const ManuallyAddEventModal = () => { }; const detailsRef = useRef(null); + const locationRef = useRef(null); const [title, setTitle] = useState(editEvent?.title || ""); const [details, setDetails] = useState(editEvent?.notes || ""); @@ -79,6 +79,7 @@ export const ManuallyAddEventModal = () => { const [isPrivate, setIsPrivate] = useState( editEvent?.private || false ); + const [location, setLocation] = useState(editEvent?.location ?? ""); useEffect(() => { if(allDayAtom === true) setIsAllDay(true); @@ -250,6 +251,7 @@ export const ManuallyAddEventModal = () => { allDay: isAllDay, attendees: selectedAttendees, notes: details, + location: location }; if (editEvent?.id) eventData.id = editEvent?.id; @@ -531,7 +533,7 @@ export const ManuallyAddEventModal = () => { Attendees @@ -591,7 +593,7 @@ export const ManuallyAddEventModal = () => { @@ -644,6 +646,35 @@ export const ManuallyAddEventModal = () => { + + locationRef?.current?.focus()}> + + + + Location + + + + + + + detailsRef?.current?.focus()}> diff --git a/components/shared/AssigneesDisplay.tsx b/components/shared/AssigneesDisplay.tsx index 90343ab..fdbcb44 100644 --- a/components/shared/AssigneesDisplay.tsx +++ b/components/shared/AssigneesDisplay.tsx @@ -42,7 +42,7 @@ const AssigneesDisplay = ({selectedAttendees, setSelectedAttendees}: { ))} - {selectedAttendees?.length === 0 && No attendees added} + {selectedAttendees?.length === 0 && No attendees added} ); }; diff --git a/hooks/firebase/types/eventData.ts b/hooks/firebase/types/eventData.ts index 616ff19..9f3a3df 100644 --- a/hooks/firebase/types/eventData.ts +++ b/hooks/firebase/types/eventData.ts @@ -11,5 +11,6 @@ export interface EventData { notes?: string, reminders?: string[] id?: string | number, - attendees?: string[] + attendees?: string[], + location?: string } \ No newline at end of file