import React, { Component } from 'react';
import { View, StyleSheet, Text } from 'react-native';
import { connect } from 'react-redux';
import { createAction } from '../utils/index';

@connect(({ welcome }) => ({ welcome }))
class WelcomeScreen extends Component {
  componentDidMount() {
    const { dispatch } = this.props;
    dispatch(createAction('welcome/init')());
  }
  // 待改进，改成启动页，目前因为时间和技术的问题，搁置。wq write
  render() {
    return (
      <View style={styles.container}>
        <Text>wle</Text>
      </View>

    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#ffffff',
  },
  img: {
    flex: 1,
    width: 400,
    height: 200,
    resizeMode: 'contain',
  },
});


export default WelcomeScreen;
