r.context.registerPhoto is not a function
alanyong91 opened this issue · 1 comments
alanyong91 commented
This is my code
<LightgalleryProvider>
<div style={{ display: "flex", alignItems: "center" }}>
{photos.map((p, key) => (
<div key={key} style={{ maxWidth: "250px", width: "200px", padding: "5px" }}>
<LightgalleryItem group="group1" src={p}>
<img src={p} style={{ width: "100%" }} />
</LightgalleryItem>
</div>
))}
</div>
</LightgalleryProvider>
and I get this error
r.context.registerPhoto is not a function
But if I remove <LightgalleryItem group="group1" src={p}>
, the error gone but lightgallery not functioning.
VLZH commented
@alanyong91 Thx!
I can`t reproduce this error; Would you can to add a link to repo with your code?