fix(user): guard openpaasId access during initial render\n\n- Use optional chaining across components reading userData.openpaasId\n- Prevent F5 crash when user data not yet hydrated\n- Cleanup unused imports

This commit is contained in:
lenhanphung
2025-09-19 14:29:10 +07:00
parent ae52f88faf
commit e24aa40cce
5 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ function EventPopover({
const dispatch = useAppDispatch();
const organizer = useAppSelector((state) => state.user.organiserData);
const userId = useAppSelector((state) => state.user.userData.openpaasId);
const userId = useAppSelector((state) => state.user.userData?.openpaasId) ?? "";
const selectPersonnalCalendars = createSelector(
(state) => state.calendars,
(calendars) =>