Skip to content

Commit

Permalink
fix: correctly set bg url
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Oct 14, 2024
1 parent 6182ef8 commit 5696991
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/frontend/src/features/InfoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,11 @@ const PictureThumbnail = ({ picture, index, status }: { picture: Pictures; index

const finalStatus = status ?? idbStatusQuery.data;

const bgUrl = bgUrlQuery.isSuccess ? bgUrlQuery.data ?? picture.url : undefined;

return (
<Flex
style={bgUrlQuery.data ? { backgroundImage: `url(${bgUrlQuery.data})` } : { backgroundColor: "gray" }}
style={bgUrl ? { backgroundImage: `url(${bgUrl})` } : { backgroundColor: "gray" }}
flexDir="column"
justifyContent="flex-end"
w="180px"
Expand Down

0 comments on commit 5696991

Please sign in to comment.