forkeado de vergnet/application-amicale
Fixed amicale category image
Este commit está contenido en:
padre
9e5542359b
commit
3275b73708
Se han modificado 1 ficheros con 18 adiciones y 4 borrados
|
@ -24,11 +24,13 @@ type Props = {
|
||||||
export type listItem = {
|
export type listItem = {
|
||||||
title: string,
|
title: string,
|
||||||
description: string,
|
description: string,
|
||||||
image: string,
|
image: string | number,
|
||||||
shouldLogin: boolean,
|
shouldLogin: boolean,
|
||||||
content: cardList,
|
content: cardList,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const AMICALE_LOGO = require("../../../assets/amicale.png");
|
||||||
|
|
||||||
const CLUBS_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Clubs.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 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";
|
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"),
|
title: i18n.t("servicesScreen.amicale"),
|
||||||
description: "LOGIN",
|
description: "LOGIN",
|
||||||
image: AMICALE_IMAGE,
|
image: AMICALE_LOGO,
|
||||||
shouldLogin: true,
|
shouldLogin: true,
|
||||||
content: this.amicaleDataset
|
content: this.amicaleDataset
|
||||||
},
|
},
|
||||||
|
@ -188,17 +190,29 @@ class ServicesScreen extends React.Component<Props> {
|
||||||
/**
|
/**
|
||||||
* Gets the list title image for the list.
|
* 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 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 {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
getListTitleImage(props, source: string) {
|
getListTitleImage(props, source: string | number) {
|
||||||
|
if (typeof source === "number")
|
||||||
return <Avatar.Image
|
return <Avatar.Image
|
||||||
{...props}
|
{...props}
|
||||||
size={48}
|
size={48}
|
||||||
source={source}
|
source={source}
|
||||||
style={{backgroundColor: 'transparent'}}
|
style={{backgroundColor: 'transparent'}}
|
||||||
/>
|
/>
|
||||||
|
else
|
||||||
|
return <Avatar.Icon
|
||||||
|
{...props}
|
||||||
|
size={48}
|
||||||
|
icon={source}
|
||||||
|
color={this.props.theme.colors.primary}
|
||||||
|
style={{backgroundColor: 'transparent'}}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Cargando…
Referenciar en una nueva incidencia