1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-21 23:17:42 +02:00

Improved init sequence

This commit is contained in:
Laurent Cozic
2017-07-08 23:57:09 +01:00
parent a9f7b0d531
commit e9f0d38a80
4 changed files with 79 additions and 22 deletions

View File

@ -2,8 +2,8 @@ import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { connect } from 'react-redux'
import { Log } from 'lib/log.js'
import { Folder } from 'lib/models/folder.js'
import { ScreenHeader } from 'lib/components/screen-header.js';
import { ActionButton } from 'lib/components/action-button.js';
class LoadingScreenComponent extends React.Component {
@ -12,18 +12,30 @@ class LoadingScreenComponent extends React.Component {
}
render() {
return (
<View style={{flex: 1}}>
<Text>Loading...</Text>
</View>
);
if (this.props.loading) {
return (
<View style={{flex: 1}}>
<Text>Loading...</Text>
</View>
);
} else {
return (
<View style={{flex: 1}}>
<ScreenHeader navState={this.props.navigation.state} />
<Text>You currently have no notebook. Create one by clicking on (+) button.</Text>
<ActionButton></ActionButton>
</View>
);
}
}
}
const LoadingScreen = connect(
(state) => {
return {};
return {
loading: state.loading,
};
}
)(LoadingScreenComponent)