Skip to content

Commit

Permalink
Revert "fix: review comment"
Browse files Browse the repository at this point in the history
This reverts commit d4e5885.
  • Loading branch information
henrikmv committed Jan 16, 2025
1 parent d4e5885 commit fc96d0e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ export const WidgetEventSchedule = ({
const orgUnitName = getCachedOrgUnitName(initialOrgUnitId);
const { currentUser, noteId } = useNoteDetails();
const [scheduleDate, setScheduleDate] = useState('');
const [scheduledOrgUnit, setScheduledOrgUnit] = useState(
initialOrgUnitId && orgUnitName ? { id: initialOrgUnitId, name: orgUnitName } : undefined);
const [scheduledOrgUnit, setScheduledOrgUnit] = useState();
useEffect(() => {
if (initialOrgUnitId && orgUnitName) {
const orgUnit = { id: initialOrgUnitId, name: orgUnitName };
setScheduledOrgUnit(orgUnit);
}
}, [orgUnitName, initialOrgUnitId]);
const [isFormValid, setIsFormValid] = useState(false);
const convertFn = pipe(convertFormToClient, convertClientToServer);
const serverScheduleDate = convertFn(scheduleDate, dataElementTypes.DATE);
Expand Down

0 comments on commit fc96d0e

Please sign in to comment.