Skip to content

Commit e8847dd

Browse files
committed
Fix overuse of vector icons dependency
1 parent d3e7b54 commit e8847dd

File tree

1 file changed

+9
-9
lines changed
  • packages/react-native/src/components/PicturesScrollPreview

1 file changed

+9
-9
lines changed

packages/react-native/src/components/PicturesScrollPreview/index.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import isEmpty from 'lodash.isempty';
44
import isPlainObject from 'lodash.isplainobject';
55

66
import { Image, Platform, SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';
7-
import { Surface, Chip, useTheme, Badge } from 'react-native-paper';
8-
import { MaterialCommunityIcons } from '@expo/vector-icons';
7+
import { Surface, Chip, useTheme, Avatar } from 'react-native-paper';
98
import { Sight } from '@monkvision/corejs';
109

1110
import SightsWheel from '../SightsWheel';
@@ -67,7 +66,7 @@ const styles = StyleSheet.create({
6766
badge: {
6867
position: 'absolute',
6968
top: -4,
70-
right: -4,
69+
right: -8,
7170
},
7271
});
7372

@@ -111,12 +110,13 @@ const PicturesScrollPreview = forwardRef(({
111110
borderColor: isActive ? colors.accent : colors.primary,
112111
}]}
113112
>
114-
<Badge
115-
visible={isPlainObject(picture)}
116-
style={[styles.badge, { backgroundColor: colors.success }]}
117-
>
118-
<MaterialCommunityIcons name="check" />
119-
</Badge>
113+
{isPlainObject(picture) && (
114+
<Avatar.Icon
115+
size={24}
116+
icon="check"
117+
style={[styles.badge, { backgroundColor: colors.success }]}
118+
/>
119+
)}
120120
<Image
121121
key={`picture-${id}`}
122122
source={source}

0 commit comments

Comments
 (0)