Added link to amicale's website
This commit is contained in:
parent
bba237abe1
commit
c480f79769
1 changed files with 15 additions and 4 deletions
|
@ -11,6 +11,7 @@ const deviceHeight = Dimensions.get("window").height;
|
||||||
const drawerCover = require("../assets/drawer-cover.png");
|
const drawerCover = require("../assets/drawer-cover.png");
|
||||||
|
|
||||||
const WIKETUD_LINK = "https://www.etud.insa-toulouse.fr/wiketud/index.php/Accueil";
|
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 = {
|
type Props = {
|
||||||
navigation: Object,
|
navigation: Object,
|
||||||
|
@ -67,9 +68,17 @@ export default class SideBar extends React.Component<Props, State> {
|
||||||
bg: "#477EEA",
|
bg: "#477EEA",
|
||||||
// types: "11"
|
// types: "11"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Amicale",
|
||||||
|
route: "amicale",
|
||||||
|
icon: "web",
|
||||||
|
bg: "#477EEA",
|
||||||
|
// types: "11"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "Wiketud",
|
name: "Wiketud",
|
||||||
route: "",
|
route: "wiketud",
|
||||||
icon: "web",
|
icon: "web",
|
||||||
bg: "#477EEA",
|
bg: "#477EEA",
|
||||||
// types: "11"
|
// types: "11"
|
||||||
|
@ -117,13 +126,15 @@ export default class SideBar extends React.Component<Props, State> {
|
||||||
renderItem={({item}) =>
|
renderItem={({item}) =>
|
||||||
<ListItem
|
<ListItem
|
||||||
button
|
button
|
||||||
noBorder={item.name !== 'Wiketud'} // Display a separator before settings
|
noBorder={item.name !== 'Wiketud' && item.name !== 'Proximo'} // Display a separator before settings and Amicale
|
||||||
selected={this.state.active === item.route}
|
selected={this.state.active === item.route}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
if (item.name !== 'Wiketud')
|
if (item.name !== 'Wiketud' && item.name !== 'Amicale')
|
||||||
this.navigateToScreen(item.route);
|
this.navigateToScreen(item.route);
|
||||||
else
|
else if (item.name === 'Wiketud')
|
||||||
Linking.openURL(WIKETUD_LINK).catch((err) => console.error('Error opening link', err));
|
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));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Left>
|
<Left>
|
||||||
|
|
Loading…
Reference in a new issue