Add empty state

pull/1344/head
Andrew Watkins 2017-04-27 11:08:12 -07:00
parent 6237ad0473
commit 0dd2ba1c96
1 changed files with 38 additions and 29 deletions

View File

@ -87,7 +87,8 @@ const DashboardsPage = React.createClass({
</button> </button>
</div> </div>
<div className="panel-body"> <div className="panel-body">
<table className="table v-center admin-table"> {dashboards && dashboards.length
? <table className="table v-center admin-table">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -95,9 +96,7 @@ const DashboardsPage = React.createClass({
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{dashboards && dashboards.length {dashboards.map(dashboard => (
? dashboards.map(dashboard => {
return (
<tr key={dashboard.id} className=""> <tr key={dashboard.id} className="">
<td className="monotype"> <td className="monotype">
<Link <Link
@ -111,11 +110,21 @@ const DashboardsPage = React.createClass({
item={dashboard} item={dashboard}
/> />
</tr> </tr>
) ))}
})
: null}
</tbody> </tbody>
</table> </table>
: <div className="generic-empty-state">
<h4 style={{marginTop: '90px'}}>
Looks like you dont have any dashboards
</h4>
<button
className="btn btn-sm btn-primary"
onClick={this.handleCreateDashbord}
style={{marginBottom: '90px'}}
>
Create Dashboard
</button>
</div>}
</div> </div>
</div> </div>
</div> </div>