diff --git a/src/components/Amicale/AuthenticatedScreen.js b/src/components/Amicale/AuthenticatedScreen.js index 032b2b9..940336d 100644 --- a/src/components/Amicale/AuthenticatedScreen.js +++ b/src/components/Amicale/AuthenticatedScreen.js @@ -32,7 +32,6 @@ class AuthenticatedScreen extends React.Component { this.props.navigation.addListener('focus', this.onScreenFocus); this.fetchedData = new Array(this.props.links.length); this.errors = new Array(this.props.links.length); - this.fetchData(); // TODO remove in prod (only use for fast refresh) } /** diff --git a/src/screens/Amicale/VoteScreen.js b/src/screens/Amicale/VoteScreen.js index 5b603a5..5af648d 100644 --- a/src/screens/Amicale/VoteScreen.js +++ b/src/screens/Amicale/VoteScreen.js @@ -53,7 +53,9 @@ const FAKE_TEAMS2 = { ], }; -type Props = {} +type Props = { + navigation: Object +} type State = { hasVoted: boolean, @@ -135,9 +137,12 @@ export default class VoteScreen extends React.Component { return null; }; - getScreen = (data: Array) => { - data[0] = FAKE_TEAMS2; - data[1] = FAKE_DATE; + getScreen = (data: Array) => { + // data[0] = FAKE_TEAMS2; + // data[1] = FAKE_DATE; + + if (data[1] === null) + data[1] = {date_begin: null}; if (data[0] !== null) { this.teams = data[0].teams;