forked from vergnet/application-amicale
Fixed amicale category image
This commit is contained in:
parent
9e5542359b
commit
3275b73708
1 changed files with 18 additions and 4 deletions
|
@ -24,11 +24,13 @@ type Props = {
|
|||
export type listItem = {
|
||||
title: string,
|
||||
description: string,
|
||||
image: string,
|
||||
image: string | number,
|
||||
shouldLogin: boolean,
|
||||
content: cardList,
|
||||
}
|
||||
|
||||
const AMICALE_LOGO = require("../../../assets/amicale.png");
|
||||
|
||||
const CLUBS_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Clubs.png";
|
||||
const PROFILE_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/ProfilAmicaliste.png";
|
||||
const VOTE_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Vote.png";
|
||||
|
@ -151,7 +153,7 @@ class ServicesScreen extends React.Component<Props> {
|
|||
{
|
||||
title: i18n.t("servicesScreen.amicale"),
|
||||
description: "LOGIN",
|
||||
image: AMICALE_IMAGE,
|
||||
image: AMICALE_LOGO,
|
||||
shouldLogin: true,
|
||||
content: this.amicaleDataset
|
||||
},
|
||||
|
@ -188,17 +190,29 @@ class ServicesScreen extends React.Component<Props> {
|
|||
/**
|
||||
* Gets the list title image for the list.
|
||||
*
|
||||
* If the source is a string, we are using an icon.
|
||||
* If the source is a number, we are using an internal image.
|
||||
*
|
||||
* @param props Props to pass to the component
|
||||
* @param source The source image to display
|
||||
* @param source The source image to display. Can be a string for icons or a number for local images
|
||||
* @returns {*}
|
||||
*/
|
||||
getListTitleImage(props, source: string) {
|
||||
getListTitleImage(props, source: string | number) {
|
||||
if (typeof source === "number")
|
||||
return <Avatar.Image
|
||||
{...props}
|
||||
size={48}
|
||||
source={source}
|
||||
style={{backgroundColor: 'transparent'}}
|
||||
/>
|
||||
else
|
||||
return <Avatar.Icon
|
||||
{...props}
|
||||
size={48}
|
||||
icon={source}
|
||||
color={this.props.theme.colors.primary}
|
||||
style={{backgroundColor: 'transparent'}}
|
||||
/>
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue