mirror of
https://github.com/tjsga/tj-sga-website-react.git
synced 2025-04-03 20:00:17 -04:00
Update ImageUrl types
This commit is contained in:
parent
4a0d32a42e
commit
cbf84db701
|
@ -13,7 +13,10 @@ export default function ArticleRow({
|
|||
let thumbnail: React.ReactElement | null = null;
|
||||
if (article.thumbnail) {
|
||||
thumbnail = (
|
||||
<img src={imageUrl(article.thumbnail).url()} alt={article.title} />
|
||||
<img
|
||||
src={imageUrl(article.thumbnail).url() ?? undefined}
|
||||
alt={article.title}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ export default function NewsArticle() {
|
|||
|
||||
let thumbnailUrl = '/images/hero.png';
|
||||
if (article?.thumbnail) {
|
||||
thumbnailUrl = imageUrl(article.thumbnail).url();
|
||||
thumbnailUrl = imageUrl(article.thumbnail).url()!;
|
||||
}
|
||||
|
||||
const goToAllNewsArticles = (
|
||||
|
|
Loading…
Reference in New Issue
Block a user