diff --git a/app/archives/page.tsx b/app/archives/page.tsx index 5cb1c84..9e7800c 100644 --- a/app/archives/page.tsx +++ b/app/archives/page.tsx @@ -38,7 +38,7 @@ const IssueCard = ({ issue }: { issue: IssueArchive }) => { // fill width={300} height={300} - alt={issue.imageUrl} + alt={issue.imageUrl || ARTICLE_DEFAULT_IMAGE} className="aspect-[16/9] object-cover" sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw" /> diff --git a/db/queries/issues.ts b/db/queries/issues.ts index 5dd2e81..d8ff3a0 100644 --- a/db/queries/issues.ts +++ b/db/queries/issues.ts @@ -15,14 +15,14 @@ type Issue = { issueNumber: number; issueName: string; publishedAt: string | null; - imageUrl: string; + imageUrl?: string | null; } export type IssueArchive = { issueNumber: number; issueName: string; publishedAt: string | null; - imageUrl: string; + imageUrl?: string | null; } // NOTE - Caching is per request export const getLatestPublishedIssue = wrapCache(async () => {