|
@@ -19,18 +19,19 @@
|
19
|
19
|
|
20
|
20
|
import * as React from 'react';
|
21
|
21
|
import i18n from 'i18n-js';
|
22
|
|
-import { Avatar, List, useTheme, withTheme } from 'react-native-paper';
|
|
22
|
+import { List, useTheme, withTheme } from 'react-native-paper';
|
23
|
23
|
import WebSectionList from '../../../components/Screens/WebSectionList';
|
24
|
24
|
import MaterialHeaderButtons, {
|
25
|
25
|
Item,
|
26
|
26
|
} from '../../../components/Overrides/CustomHeaderButton';
|
27
|
27
|
import type { SectionListDataType } from '../../../components/Screens/WebSectionList';
|
28
|
|
-import { StyleSheet } from 'react-native';
|
|
28
|
+import { Image, StyleSheet } from 'react-native';
|
29
|
29
|
import Urls from '../../../constants/Urls';
|
30
|
30
|
import { readData } from '../../../utils/WebData';
|
31
|
31
|
import { useNavigation } from '@react-navigation/core';
|
32
|
32
|
import { useLayoutEffect } from 'react';
|
33
|
33
|
import { useCachedProximoCategories } from '../../../utils/cacheContext';
|
|
34
|
+import GENERAL_STYLES from '../../../constants/Styles';
|
34
|
35
|
|
35
|
36
|
const LIST_ITEM_HEIGHT = 84;
|
36
|
37
|
|
|
@@ -63,6 +64,12 @@ const styles = StyleSheet.create({
|
63
|
64
|
item: {
|
64
|
65
|
justifyContent: 'center',
|
65
|
66
|
},
|
|
67
|
+ avatar: {
|
|
68
|
+ marginLeft: 5,
|
|
69
|
+ ...GENERAL_STYLES.centerVertical,
|
|
70
|
+ height: 35,
|
|
71
|
+ width: 35,
|
|
72
|
+ },
|
66
|
73
|
});
|
67
|
74
|
|
68
|
75
|
function sortCategories(
|
|
@@ -172,7 +179,10 @@ function ProximoMainScreen() {
|
172
|
179
|
onPress={onPress}
|
173
|
180
|
left={(props) =>
|
174
|
181
|
item.icon.endsWith('.png') ? (
|
175
|
|
- <Avatar.Image style={props.style} source={{ uri: item.icon }} />
|
|
182
|
+ <Image
|
|
183
|
+ style={{ ...props.style, ...styles.avatar }}
|
|
184
|
+ source={{ uri: Urls.proximo.icons + item.icon }}
|
|
185
|
+ />
|
176
|
186
|
) : (
|
177
|
187
|
<List.Icon
|
178
|
188
|
style={props.style}
|