one-zero-eight / website

InNoHassle website for accessing ecosystem services at Innopolis University. Student dashboard, personal schedule, room booking, interactive maps, and more.
https://innohassle.ru
MIT License
10 stars 4 forks source link

[Schedule] Add error state #131

Open danmaninc opened 8 months ago

danmaninc commented 8 months ago

Describe the feature

When the data fetching is failed (for example, in the schedule lists), the short description of error should appear. For example, in the ScheduleList component instead of infinite loading we can display appeared error. image

Suggested solution

Let's consider this fragment: https://github.com/one-zero-eight/InNoHassle-Website/blob/22d535c2d1f6b5096dfeb10060d2510488ab175b/components/schedule/ScheduleList.tsx#L17

const { data } = useEventGroupsListEventGroups();

This hook can additionally return isError and isLoading boolean values. For example,

const { data, isError, isLoading } = useEventGroupsListEventGroups();

This may be helpful while implementing this feature.

Additional context

No response