feat: update thumbnail api

This commit is contained in:
2024-03-03 17:25:22 +07:00
parent 110bdd88e6
commit 24717db264
14 changed files with 476 additions and 61 deletions
+8 -4
View File
@@ -16,10 +16,14 @@ const ProjectCard = ({ project }: Props) => {
href={`/${project.slug}`}
className="border border-white/20 hover:border-white/40 rounded-lg transition-colors overflow-hidden"
>
<img
src={`/api/thumbnail/${project.slug}`}
className="w-full aspect-[3/2] bg-background object-cover"
/>
{project.thumbnail ? (
<img
src={`/api/thumbnail/${project.thumbnail}`}
className="w-full aspect-[3/2] bg-background object-cover"
/>
) : (
<div className="w-full aspect-[3/2] bg-gray-900"></div>
)}
<div className="py-2 px-3 flex items-center gap-3">
<div className="size-8 rounded-full bg-white/80"></div>