use cover instead of preview of coverSrc

This commit is contained in:
tmshv committed 2020-03-11 13:38:50 +03:00
1 parent a4d245007e
commit b7f3bbbcef
9 files changed
+72 -58

No files matched your search

+2 -4
View File
@@ -109,15 +109,13 @@ export const getStaticProps = async (ctx: NextPageContext) => {
const data: CardData[] = pages
.filter(Boolean)
.map(x => {
const image = x.preview.artifacts.large
return {
title: x.title,
caption: x.description,
href: x.url,
imageAlt: title,
imageSrc: image.src,
imageSrcSet: imageSrcSet(image.src, [ImageSize.medium, ImageSize.small])
imageSrc: x.cover.src,
imageSrcSet: imageSrcSet(x.cover.src, [ImageSize.medium, ImageSize.small])
}
})