Created
November 22, 2016 15:41
-
-
Save hai5nguy/2ef0f2222b7fac58cabc6a27344e491f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Component } from 'react'; | |
import {connect} from 'react-redux'; | |
import Table from './Table'; | |
import TableColumns from './TableColumns'; | |
import TableRows from './TableRows'; | |
class TableContainer extends Component{ | |
render(){ | |
const {tableData} = this.props; | |
console.log("TABLE DATA: ", tableData); //TABLE DATA WILL SHOW HERE | |
if (tableData.lenght) { | |
var table = ( | |
<Table> | |
<TableColumns data={tableData}/> | |
<TableRows data={tableData} /> | |
</Table> | |
) | |
} else { | |
var table = undefined; //maybe null or '' here | |
} | |
return( | |
<div> | |
{table} | |
</div> | |
); | |
} | |
} | |
export default TableContainer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment