Skip to content

Commit

Permalink
remove mockup
Browse files Browse the repository at this point in the history
  • Loading branch information
barbara-chaves committed Dec 1, 2023
1 parent 1198c2b commit 8bbb650
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 104 deletions.
13 changes: 3 additions & 10 deletions client/src/containers/map/markers/story-markers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { stepAtom } from '@/store/stories';
import { useGetStoriesId } from '@/types/generated/story';

import StoryMarkerMedia from './marker';
import markersMockup from './markers-mockup.json';

type StoryMarker = {
id: number;
Expand All @@ -31,15 +30,9 @@ const StoryMarkers = () => {
});

const markers: StoryMarker[] = useMemo(() => {
// USING MOCKUPS!! TODO: TO CHANGE TO REAL DATA USE THE CODE BELOW
//return storyData?.data?.attributes?.steps?.data?.[step]?.attributes?.layout[0].map?.markers || []
if (
step === 0 &&
storyData?.data?.attributes?.steps?.data?.[step]?.attributes?.layout[0].map?.markers
) {
return markersMockup;
}
return [];
return (
storyData?.data?.attributes?.steps?.data?.[step]?.attributes?.layout[0].map?.markers || []
);
}, [step, storyData?.data?.attributes?.steps?.data]);

return (
Expand Down

This file was deleted.

5 changes: 1 addition & 4 deletions client/src/containers/map/markers/story-markers/media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ const StoryMarker = ({ media, name, isFullScreen, onClickExpand }: StoryMarkerMe
const [hovered, setHovered] = useState(false);
const mediaType = media?.mime?.split('/')[0];

// USING MOCKUPS. TODO: TO CHANGE TO REAL DATA UNDO COMMENT BELOW
// const mediaSrc = `${apiBaseUrl}${(!isFullScreen && media.formats?.thumbnail?.url) || media.url}`;
const mediaSrc = media?.url;

const mediaSrc = `${apiBaseUrl}${media?.url}`;
const mediaMime = media?.mime;

const handlePlayVideo = useCallback(
Expand Down

0 comments on commit 8bbb650

Please sign in to comment.