Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PlanningScreen.js 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // @flow
  2. import * as React from 'react';
  3. import {Button, H3, Text} from 'native-base';
  4. import i18n from "i18n-js";
  5. import {View} from "react-native";
  6. import CustomMaterialIcon from "../components/CustomMaterialIcon";
  7. import ThemeManager from "../utils/ThemeManager";
  8. import {Linking} from "expo";
  9. import BaseContainer from "../components/BaseContainer";
  10. type Props = {
  11. navigation: Object,
  12. }
  13. /**
  14. * Opens a link in the device's browser
  15. * @param link The link to open
  16. */
  17. function openWebLink(link) {
  18. Linking.openURL(link).catch((err) => console.error('Error opening link', err));
  19. }
  20. /**
  21. * Class defining the app's planning screen
  22. */
  23. export default class PlanningScreen extends React.Component<Props> {
  24. render() {
  25. const nav = this.props.navigation;
  26. return (
  27. <BaseContainer navigation={nav} headerTitle={i18n.t('screens.planning')}>
  28. <View style={{
  29. flexGrow: 1,
  30. justifyContent: 'center',
  31. alignItems: 'center',
  32. }}>
  33. <View style={{
  34. justifyContent: 'center',
  35. alignItems: 'center',
  36. width: '100%',
  37. height: 100,
  38. marginBottom: 20
  39. }}>
  40. <CustomMaterialIcon
  41. icon={'forklift'}
  42. fontSize={100}
  43. width={100}
  44. color={ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText}/>
  45. </View>
  46. <H3 style={{
  47. textAlign: 'center',
  48. marginRight: 20,
  49. marginLeft: 20,
  50. color: ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText
  51. }}>
  52. {i18n.t('planningScreen.wipTitle')}
  53. </H3>
  54. <Text style={{
  55. textAlign: 'center',
  56. color: ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText
  57. }}>
  58. {i18n.t('planningScreen.wipSubtitle')}
  59. </Text>
  60. <Button block style={{marginTop: 20, marginRight: 10, marginLeft: 10}}
  61. onPress={() => openWebLink('https://www.facebook.com/groups/2054302624595234/')}>
  62. <Text>Clubs et Evenements</Text>
  63. </Button>
  64. </View>
  65. </BaseContainer>
  66. );
  67. }
  68. }