Add alt text to feature image on blog post
This commit is contained in:
parent
5d787c5054
commit
2efcc00d52
|
@ -27,7 +27,10 @@ export function Article(props: IPost) {
|
||||||
<article>
|
<article>
|
||||||
<div className="flex flex-col items-center mt-10 mb-16 space-y-4">
|
<div className="flex flex-col items-center mt-10 mb-16 space-y-4">
|
||||||
<Contained>
|
<Contained>
|
||||||
<ArticleSectionFeatureImage featureImage={featureImage} />
|
<ArticleSectionFeatureImage
|
||||||
|
featureImage={featureImage}
|
||||||
|
title={title}
|
||||||
|
/>
|
||||||
</Contained>
|
</Contained>
|
||||||
|
|
||||||
<ArticleContained>
|
<ArticleContained>
|
||||||
|
|
|
@ -2,15 +2,16 @@ import { IFigureImage } from '../../../types/cms';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
featureImage: IFigureImage;
|
featureImage: IFigureImage;
|
||||||
|
title: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ArticleSectionFeatureImage({ featureImage }: Props) {
|
export function ArticleSectionFeatureImage({ featureImage, title }: Props) {
|
||||||
return (
|
return (
|
||||||
<div className="w-full pb-4 desktop:pb-0">
|
<div className="w-full pb-4 desktop:pb-0">
|
||||||
<div className="relative w-full mb-4 aspect-w-14 aspect-h-8">
|
<div className="relative w-full mb-4 aspect-w-14 aspect-h-8">
|
||||||
<img
|
<img
|
||||||
src={featureImage?.imageUrl}
|
src={featureImage?.imageUrl}
|
||||||
alt={featureImage?.description ?? ''}
|
alt={featureImage?.description ?? title}
|
||||||
className="object-cover rounded"
|
className="object-cover rounded"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue