Browse Source

Use custom icon for amicale website

Arnaud Vergnet 1 year ago
parent
commit
9e5542359b
1 changed files with 4 additions and 16 deletions
  1. 4
    16
      src/screens/Services/ServicesScreen.js

+ 4
- 16
src/screens/Services/ServicesScreen.js View File

@@ -24,7 +24,7 @@ type Props = {
24 24
 export type listItem = {
25 25
     title: string,
26 26
     description: string,
27
-    image: string | number,
27
+    image: string,
28 28
     shouldLogin: boolean,
29 29
     content: cardList,
30 30
 }
@@ -32,7 +32,7 @@ export type listItem = {
32 32
 const CLUBS_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Clubs.png";
33 33
 const PROFILE_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/ProfilAmicaliste.png";
34 34
 const VOTE_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Vote.png";
35
-const AMICALE_IMAGE = require("../../../assets/amicale.png");
35
+const AMICALE_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/WebsiteAmicale.png";
36 36
 
37 37
 const PROXIMO_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Proximo.png"
38 38
 const WIKETUD_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Wiketud.png";
@@ -188,29 +188,17 @@ class ServicesScreen extends React.Component<Props> {
188 188
     /**
189 189
      * Gets the list title image for the list.
190 190
      *
191
-     * If the source is a string, we are using an icon.
192
-     * If the source is a number, we are using an internal image.
193
-     *
194 191
      * @param props Props to pass to the component
195
-     * @param source The source image to display. Can be a string for icons or a number for local images
192
+     * @param source The source image to display
196 193
      * @returns {*}
197 194
      */
198
-    getListTitleImage(props, source: string | number) {
199
-        if (typeof source === "number")
195
+    getListTitleImage(props, source: string) {
200 196
             return <Avatar.Image
201 197
                 {...props}
202 198
                 size={48}
203 199
                 source={source}
204 200
                 style={{backgroundColor: 'transparent'}}
205 201
             />
206
-        else
207
-            return <Avatar.Icon
208
-                {...props}
209
-                size={48}
210
-                icon={source}
211
-                color={this.props.theme.colors.primary}
212
-                style={{backgroundColor: 'transparent'}}
213
-            />
214 202
     }
215 203
 
216 204
     /**

Loading…
Cancel
Save