From c480f797691284dce012568e7a17e6bd961248cc Mon Sep 17 00:00:00 2001 From: keplyx Date: Wed, 31 Jul 2019 14:43:19 +0200 Subject: [PATCH] Added link to amicale's website --- components/SideMenu.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/components/SideMenu.js b/components/SideMenu.js index f321ff8..6de1858 100644 --- a/components/SideMenu.js +++ b/components/SideMenu.js @@ -11,6 +11,7 @@ const deviceHeight = Dimensions.get("window").height; const drawerCover = require("../assets/drawer-cover.png"); const WIKETUD_LINK = "https://www.etud.insa-toulouse.fr/wiketud/index.php/Accueil"; +const Amicale_LINK = "https://www.etud.insa-toulouse.fr/~amicale"; type Props = { navigation: Object, @@ -67,9 +68,17 @@ export default class SideBar extends React.Component { bg: "#477EEA", // types: "11" }, + { + name: "Amicale", + route: "amicale", + icon: "web", + bg: "#477EEA", + // types: "11" + }, + { name: "Wiketud", - route: "", + route: "wiketud", icon: "web", bg: "#477EEA", // types: "11" @@ -117,13 +126,15 @@ export default class SideBar extends React.Component { renderItem={({item}) => { - if (item.name !== 'Wiketud') + if (item.name !== 'Wiketud' && item.name !== 'Amicale') this.navigateToScreen(item.route); - else + else if (item.name === 'Wiketud') Linking.openURL(WIKETUD_LINK).catch((err) => console.error('Error opening link', err)); + else if (item.name === 'Amicale') + Linking.openURL(Amicale_LINK).catch((err) => console.error('Error opening link', err)); }} >