Skip to content

Commit

Permalink
Fix marker medias not working
Browse files Browse the repository at this point in the history
  • Loading branch information
barbara-chaves committed Mar 14, 2024
1 parent 59a172c commit 7f0c6e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/containers/map/markers/story-markers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const StoryMarkers = () => {
});
const [currentMedia, setCurrentMedia] = useState<number>();
const markers: StoryMarker[] = useMemo(() => {
return (storyData?.data?.attributes?.steps?.[step]?.map as StoryStepMap)?.markers || [];
return (storyData?.data?.attributes?.steps?.[step - 1]?.map as StoryStepMap)?.markers || [];
}, [step, storyData?.data?.attributes?.steps]);

const medias = useMemo(() => {
Expand Down

0 comments on commit 7f0c6e8

Please sign in to comment.