Skip to content

Commit 9d2a35e

Browse files
committed
Add default thumbnails to all courses section
1 parent e62fdce commit 9d2a35e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/components/pages/CourseDashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function CourseDashboard() {
164164
<img
165165
className="rounded outline outline-1 outline-black/40 object-fill w-full h-full block aspect-[16/9]"
166166
src={process.env.PUBLIC_URL + `/content/${course.ID}/thumbnail.png`}
167-
onError={(e)=>{e.target.onError = null; e.target.className = "invisible"}}
167+
onError={(e)=>{e.target.onError = null; e.target.src = `/default_thumbnails/tn${course.ID % 5}.png`}}
168168
alt="Thumbnail"
169169
/>
170170
</div>

0 commit comments

Comments
 (0)