mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-06 11:28:45 +00:00
simplify things
This commit is contained in:
@@ -51,7 +51,7 @@ const Navbar = ({ children, brew, editor, title = '', props }) => {
|
||||
</Nav.item>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const renderFile = () => {
|
||||
return (
|
||||
<Dropdown groupName={'File'} customTrigger={<>File</>} icon={null} key={'file'}>
|
||||
@@ -79,7 +79,7 @@ const Navbar = ({ children, brew, editor, title = '', props }) => {
|
||||
</Dropdown>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const renderEdit = () => {
|
||||
return (
|
||||
<Dropdown groupName={'Edit'} customTrigger={<>Edit</>} icon={null} key={'edit'}>
|
||||
@@ -162,9 +162,4 @@ const Navbar = ({ children, brew, editor, title = '', props }) => {
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Navbar.File = () => null;
|
||||
Navbar.Edit = () => null;
|
||||
Navbar.Go = () => null;
|
||||
|
||||
export default Navbar;
|
||||
|
||||
@@ -357,29 +357,6 @@ export default function useCommonEditPageFunctions(dependencies) {
|
||||
</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 = ()=>(
|
||||
<Nav.item onClick={toggleAutoSave}>
|
||||
|
||||
Reference in New Issue
Block a user