mirror of
https://github.com/urosran/cally.git
synced 2025-07-15 09:45:20 +00:00
New onboarding flow, calendar sync logic refactor
This commit is contained in:
@ -103,6 +103,7 @@ export const ManuallyAddEventModal = () => {
|
||||
|
||||
const {mutateAsync: createEvent, isLoading: isAdding, isError} = useCreateEvent();
|
||||
const {data: members} = useGetFamilyMembers(true);
|
||||
const titleRef = useRef<TextFieldRef>(null)
|
||||
|
||||
const isLoading = isDeleting || isAdding
|
||||
|
||||
@ -135,6 +136,14 @@ export const ManuallyAddEventModal = () => {
|
||||
setRepeatInterval([]);
|
||||
}, [editEvent, selectedNewEventDate]);
|
||||
|
||||
useEffect(() => {
|
||||
if(show && !editEvent) {
|
||||
setTimeout(() => {
|
||||
titleRef?.current?.focus()
|
||||
}, 500);
|
||||
}
|
||||
}, [selectedNewEventDate]);
|
||||
|
||||
if (!show) return null;
|
||||
|
||||
const formatDateTime = (date?: Date | string) => {
|
||||
@ -342,6 +351,7 @@ export const ManuallyAddEventModal = () => {
|
||||
<ScrollView style={{minHeight: "85%"}}>
|
||||
<TextField
|
||||
placeholder="Add event title"
|
||||
ref={titleRef}
|
||||
value={title}
|
||||
onChangeText={(text) => {
|
||||
setTitle(text);
|
||||
|
Reference in New Issue
Block a user