diff --git a/apps/web/src/pages/home/stories/Stories.tsx b/apps/web/src/pages/home/stories/Stories.tsx index 3f361d91..eda9d315 100644 --- a/apps/web/src/pages/home/stories/Stories.tsx +++ b/apps/web/src/pages/home/stories/Stories.tsx @@ -17,6 +17,7 @@ import { useStoriesQuery } from "../../../hooks/useStories"; import styles, { getModalStyles } from "./styles"; import _ from "lodash"; import ContentLoader from "react-content-loader"; +import { v4 } from "uuid"; dayjs.extend(relativeTime); dayjs.extend(utc); @@ -337,17 +338,17 @@ function Stories() { > {stories.map((item, index) => ( { setCurrentlyPlaying(item); setCurrentIndex(index); setIsOpen(true); }} > - {!item.avatar?.endsWith("/@jpeg") && ( + {item.avatar && !item.avatar.endsWith("/@jpeg") && ( )} - {item.avatar?.endsWith("/@jpeg") && ( + {item.avatar && item.avatar.endsWith("/@jpeg") && (
@@ -397,14 +398,16 @@ function Stories() {
- {!currentlyPlaying?.avatar?.endsWith("/@jpeg") && ( - - )} - {currentlyPlaying?.avatar?.endsWith("/@jpeg") && ( -
- -
- )} + {currentlyPlaying?.avatar && + !currentlyPlaying?.avatar?.endsWith("/@jpeg") && ( + + )} + {currentlyPlaying?.avatar && + currentlyPlaying.avatar.endsWith("/@jpeg") && ( +
+ +
+ )}