diff --git a/src/components/postCard/view/postCardView.js b/src/components/postCard/view/postCardView.js index fd09abc9b..1d747f7aa 100644 --- a/src/components/postCard/view/postCardView.js +++ b/src/components/postCard/view/postCardView.js @@ -21,7 +21,7 @@ import styles from './postCardStyles'; import DEFAULT_IMAGE from '../../../assets/no_image.png'; import NSFW_IMAGE from '../../../assets/nsfw.png'; -const { width } = Dimensions.get('window'); +const { width, height } = Dimensions.get('window'); const PostCardView = ({ handleOnUserPress, @@ -106,7 +106,10 @@ const PostCardView = ({ {!isHideImage && ( { const actionSheet = useRef(null); - + const [calcImgHeight, setCalcImgHeight] = useState(0); // Component Life Cycles // Component Functions @@ -60,7 +62,14 @@ const PostListItemView = ({ handleOnPressItem(id)}> - + + setCalcImgHeight((evt.nativeEvent.height / evt.nativeEvent.width) * width) + } + /> {title} {summary}