mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-17 22:58:45 +00:00
refactor uipage to be functional
This commit is contained in:
@@ -1,7 +1,4 @@
|
|||||||
import './uiPage.less';
|
import './uiPage.less';
|
||||||
import React from 'react';
|
|
||||||
import createReactClass from 'create-react-class';
|
|
||||||
|
|
||||||
import Nav from '../../../navbar/nav.jsx';
|
import Nav from '../../../navbar/nav.jsx';
|
||||||
import Navbar from '../../../navbar/navbar.jsx';
|
import Navbar from '../../../navbar/navbar.jsx';
|
||||||
import NewBrewItem from '../../../navbar/newbrew.navitem.jsx';
|
import NewBrewItem from '../../../navbar/newbrew.navitem.jsx';
|
||||||
@@ -10,15 +7,12 @@ import RecentNavItems from '../../../navbar/recent.navitem.jsx';
|
|||||||
const { both: RecentNavItem } = RecentNavItems;
|
const { both: RecentNavItem } = RecentNavItems;
|
||||||
import Account from '../../../navbar/account.navitem.jsx';
|
import Account from '../../../navbar/account.navitem.jsx';
|
||||||
|
|
||||||
|
const UIPage = ({brew, children})=>{
|
||||||
|
|
||||||
const UIPage = createReactClass({
|
return <div className='sitePage uiPage'>
|
||||||
displayName : 'UIPage',
|
|
||||||
|
|
||||||
render : function(){
|
|
||||||
return <div className='uiPage sitePage'>
|
|
||||||
<Navbar>
|
<Navbar>
|
||||||
<Nav.section>
|
<Nav.section>
|
||||||
<Nav.item className='brewTitle'>{this.props.brew.title}</Nav.item>
|
<Nav.item className='brewTitle'>{brew?.title}</Nav.item>
|
||||||
</Nav.section>
|
</Nav.section>
|
||||||
|
|
||||||
<Nav.section>
|
<Nav.section>
|
||||||
@@ -30,10 +24,9 @@ const UIPage = createReactClass({
|
|||||||
</Navbar>
|
</Navbar>
|
||||||
|
|
||||||
<div className='content'>
|
<div className='content'>
|
||||||
{this.props.children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
};
|
||||||
});
|
|
||||||
|
|
||||||
export default UIPage;
|
export default UIPage;
|
||||||
|
|||||||
Reference in New Issue
Block a user