diff --git a/src/components/Courses.tsx b/src/components/Courses.tsx index 2f348b448..1cd9ac2c2 100644 --- a/src/components/Courses.tsx +++ b/src/components/Courses.tsx @@ -7,6 +7,8 @@ import { RefreshDb } from './RefreshDb'; export const Courses = ({ courses }: { courses: Course[] }) => { const router = useRouter(); + const shouldShowRefreshDb = !courses || courses.length === 0; + return (
@@ -27,7 +29,7 @@ export const Courses = ({ courses }: { courses: Course[] }) => { /> ))}
- + {shouldShowRefreshDb && }
); };