Render Create Dashboard button on empty Dashboards Table only if at least Editor

pull/2453/head
Jared Scheib 2017-11-30 21:01:35 -08:00
parent 4b748528e1
commit 1dd66754ba
1 changed files with 9 additions and 7 deletions

View File

@ -56,6 +56,7 @@ const DashboardsTable = ({
<h4 style={{marginTop: '90px'}}> <h4 style={{marginTop: '90px'}}>
Looks like you dont have any dashboards Looks like you dont have any dashboards
</h4> </h4>
<Authorized requiredRole={EDITOR_ROLE}>
<button <button
className="btn btn-sm btn-primary" className="btn btn-sm btn-primary"
onClick={onCreateDashboard} onClick={onCreateDashboard}
@ -63,6 +64,7 @@ const DashboardsTable = ({
> >
<span className="icon plus" /> Create Dashboard <span className="icon plus" /> Create Dashboard
</button> </button>
</Authorized>
</div> </div>
} }