Skip to content

Commit

Permalink
fix createEvent to close modal and show events without refresh (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
skbhagat0502 authored Oct 31, 2023
1 parent 1cc674e commit 40efb0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/EventCalendar/EventCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const Calendar: React.FC<InterfaceCalendarProps> = ({
useEffect(() => {
const data = filterData(eventData, orgData, userRole, userId);
setEvents(data);
}, []);
}, [eventData, orgData, userRole, userId]);

const handlePrevMonth = (): void => {
if (currentMonth === 0) {
Expand Down
1 change: 1 addition & 0 deletions src/screens/OrganizationEvents/OrganizationEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function organizationEvents(): JSX.Element {
if (createEventData) {
toast.success(t('eventCreated'));
refetch();
hideInviteModal();
setFormState({
title: '',
eventdescrip: '',
Expand Down

0 comments on commit 40efb0f

Please sign in to comment.