wasp/examples/thoughts/ext/Layout.js
cursorial 7207d98c7a
refactor(examples:thoughts): Create a reusable Layout component for page layout (#253)
Fixes #252

In order to remove duplication for the TopNavbar and the TagsSidebar on
these pages we need a base Layout component. This PR eliminates the
duplication we were seeing before.

Co-authored-by: Michael Curry <michael.curry@thebeansgroup.com>
2021-06-16 14:32:10 +02:00

17 lines
379 B
JavaScript

import React from 'react'
import TopNavbar from './TopNavbar'
import TagsSidebar from './TagsSidebar'
import './Layout.css'
const Layout = ({ user, activeTag, children }) => (
<div className='layout-root'>
<TopNavbar user={user} />
<div className='layout-content'>
<TagsSidebar active={activeTag} />
{children}
</div>
</div>
)
export default Layout