mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-16 07:58:44 +00:00
simplify things
This commit is contained in:
@@ -162,9 +162,4 @@ const Navbar = ({ children, brew, editor, title = '', props }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Navbar.File = () => null;
|
|
||||||
Navbar.Edit = () => null;
|
|
||||||
Navbar.Go = () => null;
|
|
||||||
|
|
||||||
export default Navbar;
|
export default Navbar;
|
||||||
|
|||||||
@@ -357,29 +357,6 @@ export default function useCommonEditPageFunctions(dependencies) {
|
|||||||
</Nav.item>
|
</Nav.item>
|
||||||
);
|
);
|
||||||
|
|
||||||
//======----- Navbar -----======
|
|
||||||
const renderNavbar = ()=>(
|
|
||||||
<Navbar>
|
|
||||||
<Nav.section>
|
|
||||||
<Nav.item className='brewTitle'>{currentBrew.title}</Nav.item>
|
|
||||||
</Nav.section>
|
|
||||||
<Nav.section>
|
|
||||||
{(pageName == 'editPage') && renderGoogleDriveIcon()}
|
|
||||||
{error
|
|
||||||
? <ErrorNavItem error={error} clearError={clearError} />
|
|
||||||
: <Nav.dropdown className='save-menu'>
|
|
||||||
{renderSaveButton()}
|
|
||||||
{(pageName == 'editPage') && renderAutoSaveButton()}
|
|
||||||
</Nav.dropdown>}
|
|
||||||
<NewBrewItem />
|
|
||||||
<PrintNavItem />
|
|
||||||
<HelpNavItem />
|
|
||||||
{(pageName == 'editPage') && <ShareNavItem brew={currentBrew} currentPage={currentBrewRendererPageNum} />}
|
|
||||||
<RecentNavItem brew={currentBrew} storageKey={(pageName == 'editPage') ? 'edit' : undefined} />
|
|
||||||
<AccountNavItem />
|
|
||||||
</Nav.section>
|
|
||||||
</Navbar>
|
|
||||||
);
|
|
||||||
|
|
||||||
const renderAutoSaveButton = ()=>(
|
const renderAutoSaveButton = ()=>(
|
||||||
<Nav.item onClick={toggleAutoSave}>
|
<Nav.item onClick={toggleAutoSave}>
|
||||||
|
|||||||
Reference in New Issue
Block a user