fix: upcoming class colles duplicated
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m24s
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m24s
This commit is contained in:
parent
b5816155a4
commit
b89efdc65c
1 changed files with 4 additions and 10 deletions
|
|
@ -61,25 +61,19 @@ export default function Home({ user }: { user: User }) {
|
|||
studentColles,
|
||||
classColles,
|
||||
favoriteColles,
|
||||
upcomingClassColles,
|
||||
healthyUntil,
|
||||
lastSync,
|
||||
error,
|
||||
isLoading,
|
||||
} = useColles(startDate);
|
||||
|
||||
// Fetch upcoming colles from API
|
||||
const {
|
||||
classColles: upcomingClassColles,
|
||||
error: upcomingError,
|
||||
isLoading: upcomingIsLoading,
|
||||
} = useColles(DateTime.now());
|
||||
|
||||
// Error handling (after all hooks)
|
||||
if (error || upcomingError)
|
||||
if (error)
|
||||
return (
|
||||
<Error
|
||||
title="Impossible de charger les colles"
|
||||
message={error?.toString() || upcomingError?.toString()}
|
||||
message={error?.toString()}
|
||||
code={500}
|
||||
description="Une erreur s'est produite lors du chargement de la liste des colles."
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue