|
@@ -10,8 +10,9 @@ const deviceHeight = Dimensions.get("window").height;
|
10
|
10
|
|
11
|
11
|
const drawerCover = require("../assets/drawer-cover.png");
|
12
|
12
|
|
13
|
|
-const WIKETUD_LINK = "https://www.etud.insa-toulouse.fr/wiketud/index.php/Accueil";
|
|
13
|
+const WIKETUD_LINK = "https://www.etud.insa-toulouse.fr/wiketud";
|
14
|
14
|
const Amicale_LINK = "https://www.etud.insa-toulouse.fr/~amicale";
|
|
15
|
+const TIMETABLE_LINK = "http://planex.insa-toulouse.fr";
|
15
|
16
|
|
16
|
17
|
type Props = {
|
17
|
18
|
navigation: Object,
|
|
@@ -73,14 +74,23 @@ export default class SideBar extends React.Component<Props, State> {
|
73
|
74
|
route: "amicale",
|
74
|
75
|
icon: "web",
|
75
|
76
|
bg: "#477EEA",
|
|
77
|
+ link: Amicale_LINK
|
|
78
|
+ // types: "11"
|
|
79
|
+ },
|
|
80
|
+ {
|
|
81
|
+ name: i18n.t('screens.timetable'),
|
|
82
|
+ route: "timetable",
|
|
83
|
+ icon: "timetable",
|
|
84
|
+ bg: "#477EEA",
|
|
85
|
+ link: TIMETABLE_LINK
|
76
|
86
|
// types: "11"
|
77
|
87
|
},
|
78
|
|
-
|
79
|
88
|
{
|
80
|
89
|
name: "Wiketud",
|
81
|
90
|
route: "wiketud",
|
82
|
|
- icon: "web",
|
|
91
|
+ icon: "wikipedia",
|
83
|
92
|
bg: "#477EEA",
|
|
93
|
+ link: WIKETUD_LINK
|
84
|
94
|
// types: "11"
|
85
|
95
|
},
|
86
|
96
|
{
|
|
@@ -129,12 +139,10 @@ export default class SideBar extends React.Component<Props, State> {
|
129
|
139
|
noBorder={item.name !== 'Wiketud' && item.name !== 'Proximo'} // Display a separator before settings and Amicale
|
130
|
140
|
selected={this.state.active === item.route}
|
131
|
141
|
onPress={() => {
|
132
|
|
- if (item.name !== 'Wiketud' && item.name !== 'Amicale')
|
|
142
|
+ if (item.link !== undefined)
|
|
143
|
+ Linking.openURL(item.link).catch((err) => console.error('Error opening link', err));
|
|
144
|
+ else
|
133
|
145
|
this.navigateToScreen(item.route);
|
134
|
|
- else if (item.name === 'Wiketud')
|
135
|
|
- Linking.openURL(WIKETUD_LINK).catch((err) => console.error('Error opening link', err));
|
136
|
|
- else if (item.name === 'Amicale')
|
137
|
|
- Linking.openURL(Amicale_LINK).catch((err) => console.error('Error opening link', err));
|
138
|
146
|
}}
|
139
|
147
|
>
|
140
|
148
|
<Left>
|