Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -86,9 +86,11 @@ export default function CalendarApp({
|
||||
const tokens = useAppSelector((state) => state.user.tokens);
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
if (!tokens) {
|
||||
dispatch(push("/"));
|
||||
}
|
||||
useEffect(() => {
|
||||
if (!tokens || !user) {
|
||||
dispatch(push("/"));
|
||||
}
|
||||
}, [tokens, user]);
|
||||
|
||||
const calendars = useAppSelector((state) => state.calendars.list);
|
||||
const tempcalendars =
|
||||
|
||||
@@ -178,7 +178,7 @@ export default function CalendarSearch({
|
||||
}) {
|
||||
const dispatch = useAppDispatch();
|
||||
const openpaasId =
|
||||
useAppSelector((state) => state.user.userData.openpaasId) ?? "";
|
||||
useAppSelector((state) => state.user.userData?.openpaasId) ?? "";
|
||||
const calendars = useAppSelector((state) => state.calendars.list);
|
||||
|
||||
const [selectedCal, setSelectedCalendars] = useState<CalendarWithOwner[]>([]);
|
||||
|
||||
Reference in New Issue
Block a user