Skip to content

Commit

Permalink
fix: artwork summary item image (#14874)
Browse files Browse the repository at this point in the history
  • Loading branch information
rquartararo authored Nov 21, 2024
1 parent 36074b0 commit 50bd5da
Show file tree
Hide file tree
Showing 27 changed files with 365 additions and 419 deletions.
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
"filename": "src/Apps/__tests__/Fixtures/Order.ts",
"hashed_secret": "28433b678ebfc78ce4cfa26b83b3cded1c3c9a35",
"is_verified": false,
"line_number": 217
"line_number": 209
}
],
"src/Components/ArtworkFilter/__tests__/fixtures/ArtworkFilter.fixture.tsx": [
Expand Down Expand Up @@ -562,5 +562,5 @@
}
]
},
"generated_at": "2024-10-09T13:30:14Z"
"generated_at": "2024-11-20T13:21:49Z"
}
7 changes: 2 additions & 5 deletions src/Apps/Order/Components/ArtworkSummaryItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ const ArtworkSummaryItem: React.FC<ArtworkSummaryItemProps> = ({
const { artistNames, title, image, date } = artworkVersion || {}
const { shippingOrigin, isUnlisted } = artwork || {}

const imageURL =
image &&
image.resized_ArtworkSummaryItem &&
image.resized_ArtworkSummaryItem.url
const imageURL = image && image.resized && image.resized.url

const truncateTextStyle = {
whiteSpace: "nowrap",
Expand Down Expand Up @@ -160,7 +157,7 @@ export const ArtworkSummaryItemFragmentContainer = createFragmentContainer(
artistNames
title
image {
resized_ArtworkSummaryItem: resized(width: 55) {
resized(width: 185) {
url
}
}
Expand Down
8 changes: 0 additions & 8 deletions src/Apps/__tests__/Fixtures/Order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ const OrderArtworkNodeWithoutShipping = {
url:
"https://d7hftxdivxxvm.cloudfront.net?resize_to=fit&width=185&height=184&quality=80&src=https%3A%2F%2Fd32dm0rphc51dk.cloudfront.net%2FtOfWds4sIX_9WpRf3RqaQQ%2Flarge.jpg",
},
resized_ArtworkSummaryItem: {
url:
"https://d7hftxdivxxvm.cloudfront.net?resize_to=fit&width=185&height=184&quality=80&src=https%3A%2F%2Fd32dm0rphc51dk.cloudfront.net%2FtOfWds4sIX_9WpRf3RqaQQ%2Flarge.jpg",
},
},
internalID: "artworkId",
is_acquireable: true as boolean,
Expand Down Expand Up @@ -73,10 +69,6 @@ const OrderArtworkVersionNode = {
provenance: "",
condition_description: "",
image: {
resized_ArtworkSummaryItem: {
url:
"https://d7hftxdivxxvm.cloudfront.net?resize_to=fit&width=185&height=184&quality=80&src=https%3A%2F%2Fd32dm0rphc51dk.cloudfront.net%2FtOfWds4sIX_9WpRf3RqaQQ%2Flarge.jpg",
},
resized: {
url:
"https://d7hftxdivxxvm.cloudfront.net?resize_to=fit&width=185&height=184&quality=80&src=https%3A%2F%2Fd32dm0rphc51dk.cloudfront.net%2FtOfWds4sIX_9WpRf3RqaQQ%2Flarge.jpg",
Expand Down
20 changes: 10 additions & 10 deletions src/__generated__/AcceptTestQuery.graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/__generated__/ArtworkSummaryItem_order.graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 50bd5da

Please sign in to comment.