From 863ac6b122fc93d8cda9e601876235931f28b904 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Fri, 10 Aug 2018 13:26:34 +0200 Subject: [PATCH] Remove loading screen again --- components/chart/chart.js | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/components/chart/chart.js b/components/chart/chart.js index 604966e..6e7da68 100644 --- a/components/chart/chart.js +++ b/components/chart/chart.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { View, FlatList, Dimensions } from 'react-native' +import { View, FlatList } from 'react-native' import range from 'date-range' import { LocalDate } from 'js-joda' import { yAxis, normalizeToScale } from './y-axis' @@ -29,11 +29,9 @@ export default class CycleChart extends Component { constructor(props) { super(props) this.state = { - columns: makeColumnInfo(config.xAxisRangeInDays), - loading: true + columns: makeColumnInfo(config.xAxisRangeInDays) } this.renderColumn = ({item, index}) => { - if (index === 15 + 1 && this.state.loading) this.setState({loading: false}) return ( - {this.state.loading && - } - - {yAxisView} - item.dateString} - > - - + + {yAxisView} + item.dateString} + > + ) }