Skip to content

Instantly share code, notes, and snippets.

@Evshved
Created February 23, 2018 15:09
Show Gist options
  • Select an option

  • Save Evshved/a7c12e47c7729b9cb9a5ef00280620da to your computer and use it in GitHub Desktop.

Select an option

Save Evshved/a7c12e47c7729b9cb9a5ef00280620da to your computer and use it in GitHub Desktop.
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { View } from 'react-native';
import { withRouter } from 'react-router-native';
import { fetchUser } from 'app/resources/user/user.actions';
import Routes from 'app/components/routes';
import Header from './components/header';
import styles from './layout.styles';
import LowNavBar from './components/lowNavBar.js';
import CartItem from '../cart/cartItem.js';
class Layout extends React.Component {
static propTypes = {
fetchUser: PropTypes.func.isRequired,
}
componentDidMount = () => {
this.props.fetchUser();
}
render() {
return (
<View >
<Header />
<View>
<CartItem />
<CartItem />
</View>
<LowNavBar />
</View>
);
}
}
export default withRouter(connect(null, {
fetchUser,
})(Layout));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment