SystemMessageContainer.js 1.53 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 SystemMessage from '../components/message/SystemMessage';

import * as messageActions from '../reducers/message/messageActions';

const {

    SETTING_SAVE_REQUEST,
    SETTING_SAVE_SUCCESS,
    SETTING_SAVE_FAILURE,

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


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

const actions = [
    messageActions,
];

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 SystemMessageContainer extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <View style={styles.container}>
                <SystemMessage

                />
            </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)(SystemMessageContainer);