Skip to content

Commit

Permalink
Merge pull request #10882 from wellcomecollection/webcomics-on-storie…
Browse files Browse the repository at this point in the history
…s-landing

Webcomics on stories landing
  • Loading branch information
gestchild authored May 23, 2024
2 parents 35e55c0 + f2d1195 commit b2d20a7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions content/webapp/services/prismic/fetch/stories-landing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,38 @@ const graphQuery = `{
storiesDescription
stories {
story {
... on series {
title
promo {
... on editorialImage {
non-repeat {
caption
image
}
}
}
}
... on webcomics {
title
format {
... on article-formats {
title
}
}
promo {
... on editorialImage {
non-repeat {
caption
image
}
}
}
series {
series {
title
}
}
}
... on articles {
title
format {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { isFilledLinkToDocumentWithData } from '@weco/common/services/prismic/ty
import { asRichText, asText } from '.';

function transformStoryOrSeries(storyOrSeries) {
if (storyOrSeries.type === 'articles') {
if (storyOrSeries.type === 'articles' || storyOrSeries.type === 'webcomics') {
return transformArticleToArticleBasic(transformArticle(storyOrSeries));
} else {
return transformSeriesToSeriesBasic(transformSeries(storyOrSeries));
Expand Down

0 comments on commit b2d20a7

Please sign in to comment.