/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, { Component } from 'react';
import { connect } from 'react-redux';
import { compose } from 'redux';
import {
  StyleSheet,
  Text,
  TouchableOpacity,
  View,
} from 'react-native';
import { push } from '../BasicNavigator/actions';


type
Props = {};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

class FramePage extends Component<Props> {
  render() {
    console.log('HOMEPage', this.props);
    return (
      <View style={styles.container}>
        <TouchableOpacity onPress={() => { this.props.push('ThemePage'); }}>
          <Text style={styles.instructions}>Frame</Text>
        </TouchableOpacity>
      </View>
    );
  }
}


function actionMapping(dispatch) {
  return {
    push: compose(dispatch, push),
  };
}
//const mapDispatchToProps = dispatch => (bindActionCreators({goNext}, dispatch))

export default connect(null, actionMapping)(FramePage);
