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.

VoteTease.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // @flow
  2. import * as React from 'react';
  3. import {Avatar, Card, Paragraph} from 'react-native-paper';
  4. import {StyleSheet} from 'react-native';
  5. import i18n from 'i18n-js';
  6. import type {CardTitleIconPropsType} from '../../../constants/PaperStyles';
  7. type PropsType = {
  8. startDate: string,
  9. };
  10. const styles = StyleSheet.create({
  11. card: {
  12. margin: 10,
  13. },
  14. icon: {
  15. backgroundColor: 'transparent',
  16. },
  17. });
  18. export default class VoteTease extends React.Component<PropsType> {
  19. shouldComponentUpdate(): boolean {
  20. return false;
  21. }
  22. render(): React.Node {
  23. const {props} = this;
  24. return (
  25. <Card style={styles.card}>
  26. <Card.Title
  27. title={i18n.t('screens.vote.tease.title')}
  28. subtitle={i18n.t('screens.vote.tease.subtitle')}
  29. left={(iconProps: CardTitleIconPropsType): React.Node => (
  30. <Avatar.Icon size={iconProps.size} icon="vote" />
  31. )}
  32. />
  33. <Card.Content>
  34. <Paragraph>
  35. {`${i18n.t('screens.vote.tease.message')} ${props.startDate}`}
  36. </Paragraph>
  37. </Card.Content>
  38. </Card>
  39. );
  40. }
  41. }