Skip to content

Commit 7693164

Browse files
committed
fix image loader styling
1 parent 62f47ab commit 7693164

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

mobile/components/OImageWithLoader/OImageWithLoader.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,17 @@ import {
44
ActivityIndicator,
55
Image,
66
ImageProps,
7-
StyleProp,
87
StyleSheet,
98
View,
10-
ViewStyle,
119
} from "react-native";
1210

13-
interface OImageWithLoaderProps extends ImageProps {
14-
containerStyle?: StyleProp<ViewStyle>;
15-
}
11+
interface OImageWithLoaderProps extends ImageProps {}
1612

1713
export const OImageWithLoader = (props: OImageWithLoaderProps) => {
1814
const [isLoading, setIsLoading] = useState(false);
1915

2016
return (
21-
<View style={[styles.container, props.containerStyle]}>
17+
<View style={[styles.container, props.style]}>
2218
<Image
2319
{...props}
2420
style={[styles.image, props.style]}

mobile/screens/main/ProfileView.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import React, { useEffect, useRef, useState } from "react";
1313
import {
1414
Dimensions,
1515
FlatList,
16-
Image,
1716
Modal,
1817
StyleSheet,
1918
Text,
@@ -128,7 +127,7 @@ const ProfileView = ({
128127
setCurrentImageIndex(0);
129128
}}
130129
>
131-
<Image
130+
<OImageWithLoader
132131
source={{ uri: getValidImgURI(user.imageURIs[0]) }}
133132
style={styles.carouselImage}
134133
resizeMode="cover"
@@ -190,7 +189,7 @@ const ProfileView = ({
190189
scrollAnimationDuration={1000}
191190
defaultIndex={currentImageIndex}
192191
renderItem={({ item }) => (
193-
<Image
192+
<OImageWithLoader
194193
source={{ uri: item }}
195194
style={styles.fullScreenImage}
196195
resizeMode="contain"

0 commit comments

Comments
 (0)