fix proximo images
This commit is contained in:
parent
63722c2417
commit
a8dde29654
4 changed files with 18 additions and 10 deletions
|
@ -44,8 +44,6 @@ const styles = StyleSheet.create({
|
|||
});
|
||||
|
||||
function ProximoListItem(props: PropsType) {
|
||||
// console.log(Urls.proximo.images + props.item.image);
|
||||
|
||||
return (
|
||||
<List.Item
|
||||
title={props.item.name}
|
||||
|
|
|
@ -28,7 +28,7 @@ const AMICALE_ENDPOINT = AMICALE_SERVER + 'api/';
|
|||
const APP_ENDPOINT = STUDENT_SERVER + '~amicale_app/v2/';
|
||||
const PROXIMO_ENDPOINT = STUDENT_SERVER + '~proximo/v2/api/';
|
||||
const PROXIMO_IMAGES_ENDPOINT =
|
||||
STUDENT_SERVER + '~proximo/v2/api-proximo/public/storage/app/';
|
||||
STUDENT_SERVER + '~proximo/api_proximo/storage/app/public/';
|
||||
const APP_IMAGES_ENDPOINT = STUDENT_SERVER + '~amicale_app/images/';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -249,7 +249,10 @@ function ProximoListScreen(props: Props) {
|
|||
|
||||
<ScrollView>
|
||||
<View style={styles.modalContent}>
|
||||
<Image style={styles.image} source={{ uri: item.image }} />
|
||||
<Image
|
||||
style={styles.image}
|
||||
source={{ uri: Urls.proximo.images + item.image }}
|
||||
/>
|
||||
</View>
|
||||
<Text>{item.description}</Text>
|
||||
</ScrollView>
|
||||
|
@ -330,9 +333,6 @@ function ProximoListScreen(props: Props) {
|
|||
data: ArticlesType | undefined
|
||||
): SectionListDataType<ProximoArticleType> => {
|
||||
if (data) {
|
||||
console.log(data);
|
||||
console.log(props.route.params.category);
|
||||
|
||||
return [
|
||||
{
|
||||
title: '',
|
||||
|
|
|
@ -19,18 +19,19 @@
|
|||
|
||||
import * as React from 'react';
|
||||
import i18n from 'i18n-js';
|
||||
import { Avatar, List, useTheme, withTheme } from 'react-native-paper';
|
||||
import { List, useTheme, withTheme } from 'react-native-paper';
|
||||
import WebSectionList from '../../../components/Screens/WebSectionList';
|
||||
import MaterialHeaderButtons, {
|
||||
Item,
|
||||
} from '../../../components/Overrides/CustomHeaderButton';
|
||||
import type { SectionListDataType } from '../../../components/Screens/WebSectionList';
|
||||
import { StyleSheet } from 'react-native';
|
||||
import { Image, StyleSheet } from 'react-native';
|
||||
import Urls from '../../../constants/Urls';
|
||||
import { readData } from '../../../utils/WebData';
|
||||
import { useNavigation } from '@react-navigation/core';
|
||||
import { useLayoutEffect } from 'react';
|
||||
import { useCachedProximoCategories } from '../../../utils/cacheContext';
|
||||
import GENERAL_STYLES from '../../../constants/Styles';
|
||||
|
||||
const LIST_ITEM_HEIGHT = 84;
|
||||
|
||||
|
@ -63,6 +64,12 @@ const styles = StyleSheet.create({
|
|||
item: {
|
||||
justifyContent: 'center',
|
||||
},
|
||||
avatar: {
|
||||
marginLeft: 5,
|
||||
...GENERAL_STYLES.centerVertical,
|
||||
height: 35,
|
||||
width: 35,
|
||||
},
|
||||
});
|
||||
|
||||
function sortCategories(
|
||||
|
@ -172,7 +179,10 @@ function ProximoMainScreen() {
|
|||
onPress={onPress}
|
||||
left={(props) =>
|
||||
item.icon.endsWith('.png') ? (
|
||||
<Avatar.Image style={props.style} source={{ uri: item.icon }} />
|
||||
<Image
|
||||
style={{ ...props.style, ...styles.avatar }}
|
||||
source={{ uri: Urls.proximo.icons + item.icon }}
|
||||
/>
|
||||
) : (
|
||||
<List.Icon
|
||||
style={props.style}
|
||||
|
|
Loading…
Reference in a new issue