* added error snackbar for api fails * improved error page to be shown only for userdata errors and to allow retrying * fixed test breaking only in local because of timezone and reduced warnings for easier reading of tests results * added error management for failure inside calendars imports * added error snackbar for api fails * improved error page to be shown only for userdata errors and to allow retrying * added error management for failure inside calendars imports Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -5,10 +5,12 @@ import { useAppDispatch } from "../../app/hooks";
|
||||
import { getCalendarRange } from "../../utils/dateUtils";
|
||||
import { useAppSelector } from "../../app/hooks";
|
||||
import { refreshCalendars } from "../Event/utils/eventUtils";
|
||||
import { ErrorSnackbar } from "../Error/ErrorSnackbar";
|
||||
|
||||
export default function CalendarLayout() {
|
||||
const calendarRef = useRef<any>(null);
|
||||
const dispatch = useAppDispatch();
|
||||
const error = useAppSelector((state) => state.calendars.error);
|
||||
const selectedCalendars = useAppSelector((state) => state.calendars.list);
|
||||
const tempcalendars = useAppSelector((state) => state.calendars.templist);
|
||||
const [currentDate, setCurrentDate] = useState<Date>(new Date());
|
||||
@@ -62,6 +64,7 @@ export default function CalendarLayout() {
|
||||
onDateChange={handleDateChange}
|
||||
onViewChange={handleViewChange}
|
||||
/>
|
||||
<ErrorSnackbar error={error} type="calendar" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user