Skip to content

Commit

Permalink
Fix lightbox not showing picture
Browse files Browse the repository at this point in the history
  • Loading branch information
floo51 committed May 6, 2024
1 parent 37fb4ce commit 7edcb2a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/app/admin/catalog/OffcutCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
ReferenceField,
TextField,
usePermissions,
useStore
useStore,
} from "react-admin";
import Lightbox, { ThumbnailsRef } from "yet-another-react-lightbox";
import { Counter, Thumbnails } from "yet-another-react-lightbox/plugins";
Expand Down Expand Up @@ -88,7 +88,10 @@ const OffcutCard = ({ offcut }: { offcut: any }) => {
},
}}
close={() => setPicturesOpen(false)}
slides={offcut.pictures}
slides={offcut.pictures.map((picture: any) => ({
...picture,
src: `/scrrap-lab${picture.src}`,
}))}
/>
)}
<Card
Expand Down Expand Up @@ -138,7 +141,7 @@ const OffcutCard = ({ offcut }: { offcut: any }) => {
<CardMediaContainer>
<img
loading="lazy"
src={"/image-placeholder.svg"}
src={"/scrrap-lab/image-placeholder.svg"}
alt=""
style={{
width: "102%",
Expand Down

0 comments on commit 7edcb2a

Please sign in to comment.