fix(cockpit/Layout): ensure Layout render doesn't throw

In https://github.com/status-im/embark-area-51/commit/62964c8ce we've introduced a
regression where are two errors are thrown when `Layout` component is rendered:

- one for NavItem not having a key property
- one for margin-top not being a supported style property on Container

This commits fixes both.
This commit is contained in:
Pascal Precht 2018-10-18 16:00:12 +02:00
parent ba5e479ae8
commit 8740c8c0c9
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ const Layout = ({children, logout, credentials, location, toggleTheme, currentTh
<Nav className="d-md-down-none" navbar> <Nav className="d-md-down-none" navbar>
{sidebarNavItems.items.map((item) => { {sidebarNavItems.items.map((item) => {
return ( return (
<NavItem className="px-3"> <NavItem className="px-3" key={item.url}>
<NavLink href={item.url}> <NavLink href={item.url}>
<i className={item.icon}>&nbsp;</i> <i className={item.icon}>&nbsp;</i>
{item.name} {item.name}
@ -94,7 +94,7 @@ const Layout = ({children, logout, credentials, location, toggleTheme, currentTh
<AppSidebarMinimizer /> <AppSidebarMinimizer />
</AppSidebar> </AppSidebar>
<main className="main"> <main className="main">
<Container fluid className="h-100" style={{"margin-top": '24px'}}> <Container fluid className="h-100" style={{marginTop: '24px'}}>
{children} {children}
</Container> </Container>
</main> </main>