UserSettingContainer.js 1.52 KB
'use strict';

import React from 'react';
import ReactNative from 'react-native';
import Immutable, {Map} from 'immutable';


import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';

import Setting from '../components/setting/Setting';

import * as settingActions from '../reducers/setting/settingActions';

const {

    SETTING_SAVE_REQUEST,
    SETTING_SAVE_SUCCESS,
    SETTING_SAVE_FAILURE,

} = require('../constants/actionTypes').default;


const {
    Text,
    View,
    StyleSheet,
    Dimensions,
    Platform,
} = ReactNative;

const actions = [
    settingActions,
];

function mapStateToProps(state) {
    return {
        ...state
    };
}

function mapDispatchToProps(dispatch) {
    const creators = Map()
        .merge(...actions)
        .filter(value => typeof value === 'function')
        .toObject();

    return {
        actions: bindActionCreators(creators, dispatch),
        dispatch
    }
}

class SettingContainer extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <View style={styles.container}>
                <Setting
                    
                />
            </View>
        );
    }
}


let {width, height} = Dimensions.get('window');
let navbarHeight = (Platform.OS === 'android') ? 50 : 64;

let styles = StyleSheet.create({
    container: {
        // top: 0,
        height: height,
        backgroundColor: 'transparent'
    },

});


export default connect(mapStateToProps, mapDispatchToProps)(SettingContainer);