diff --git a/components/pages/calendar/ManuallyAddEventModal.tsx b/components/pages/calendar/ManuallyAddEventModal.tsx index efb3f48..394ec93 100644 --- a/components/pages/calendar/ManuallyAddEventModal.tsx +++ b/components/pages/calendar/ManuallyAddEventModal.tsx @@ -38,6 +38,7 @@ import { useGetFamilyMembers } from "@/hooks/firebase/useGetFamilyMembers"; import BinIcon from "@/assets/svgs/BinIcon"; import DeleteEventDialog from "./DeleteEventDialog"; import { useDeleteEvent } from "@/hooks/firebase/useDeleteEvent"; +import AddPersonIcon from "@/assets/svgs/AddPersonIcon"; const daysOfWeek = [ { label: "Monday", value: "monday" }, @@ -71,7 +72,6 @@ export const ManuallyAddEventModal = () => { }; const detailsRef = useRef(null); - const locationRef = useRef(null); const [title, setTitle] = useState(editEvent?.title || ""); const [details, setDetails] = useState(editEvent?.notes || ""); @@ -142,6 +142,15 @@ export const ManuallyAddEventModal = () => { const { data: members } = useGetFamilyMembers(true); const titleRef = useRef(null); + const [creator, setCreator] = useState(''); + useEffect(() => { + if (editEvent) { + let creatorMember = members?.find((member) => member?.uid === editEvent.creatorId); + const fullName = `${creatorMember?.firstName ?? ""}`; + setCreator(fullName); + } + }, []) + const isLoading = isDeleting || isAdding; useEffect(() => { @@ -647,34 +656,38 @@ export const ManuallyAddEventModal = () => { - - locationRef?.current?.focus()}> - - - - Location - - - - - setLocation(text)} - ref={locationRef} - maxLength={2000} - multiline - numberOfLines={2} - marginT-5 - marginL-10 - style={{ flex: 1 }} - /> + + + + { + setLocation(text); + }} + placeholderTextColor="#2d2d30" + style={{ fontFamily: "Manrope_500Medium", fontSize: 16, minWidth: "100%"}} + marginL-12 + paddingR-12 + /> + + {editEvent && <> + + + + + + + + } detailsRef?.current?.focus()}>