mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-19 11:38:13 +00:00
lint pages
This commit is contained in:
@@ -17,7 +17,6 @@ import Nav from '@navbar/nav.jsx';
|
|||||||
import Navbar from '@navbar/navbar.jsx';
|
import Navbar from '@navbar/navbar.jsx';
|
||||||
import ErrorNavItem from '@navbar/error-navitem.jsx';
|
import ErrorNavItem from '@navbar/error-navitem.jsx';
|
||||||
import googleDriveIcon from '../../../googleDrive.svg';
|
import googleDriveIcon from '../../../googleDrive.svg';
|
||||||
import {Dropdown} from '../../../../components/dropdown/dropdown.jsx';
|
|
||||||
|
|
||||||
const AUTOSAVE_KEY = 'HB_editor_autoSaveOn';
|
const AUTOSAVE_KEY = 'HB_editor_autoSaveOn';
|
||||||
const BREWKEY = 'HB_newPage_content';
|
const BREWKEY = 'HB_newPage_content';
|
||||||
@@ -352,7 +351,8 @@ const EditorPage = (props)=>{
|
|||||||
)}
|
)}
|
||||||
</Nav.item>}
|
</Nav.item>}
|
||||||
</>
|
</>
|
||||||
)};
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const renderAutoSaveButton = ()=>(
|
const renderAutoSaveButton = ()=>(
|
||||||
@@ -385,7 +385,7 @@ const EditorPage = (props)=>{
|
|||||||
save now
|
save now
|
||||||
</Nav.item>
|
</Nav.item>
|
||||||
{(pageName == 'editPage') && renderAutoSaveButton()}
|
{(pageName == 'editPage') && renderAutoSaveButton()}
|
||||||
{pageName === 'editPage' && <div className="nav-section">
|
{pageName === 'editPage' && <div className='nav-section'>
|
||||||
{renderGoogleDriveIcon()}
|
{renderGoogleDriveIcon()}
|
||||||
</div>}
|
</div>}
|
||||||
</Navbar.File>
|
</Navbar.File>
|
||||||
|
|||||||
@@ -321,24 +321,24 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
|||||||
};
|
};
|
||||||
const renderThemePicker = ()=>{
|
const renderThemePicker = ()=>{
|
||||||
return (
|
return (
|
||||||
<div className="radio-toggle theme-container">
|
<div className='radio-toggle theme-container'>
|
||||||
<h6>Theme:</h6>
|
<h6>Theme:</h6>
|
||||||
<label className="option">
|
<label className='option'>
|
||||||
<input type="radio" name="theme" onChange={(e)=>handleThemeChange(e, 'light')} checked={themeMode === 'light'}/>
|
<input type='radio' name='theme' onChange={(e)=>handleThemeChange(e, 'light')} checked={themeMode === 'light'}/>
|
||||||
<i className="fas fa-sun"/>
|
<i className='fas fa-sun'/>
|
||||||
</label>
|
</label>
|
||||||
<label className="option">
|
<label className='option'>
|
||||||
<input type="radio" name="theme" onChange={(e)=>handleThemeChange(e, 'dark')} checked={themeMode === 'dark'}/>
|
<input type='radio' name='theme' onChange={(e)=>handleThemeChange(e, 'dark')} checked={themeMode === 'dark'}/>
|
||||||
<i className="fas fa-moon"/>
|
<i className='fas fa-moon'/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderNav = ()=>{
|
const renderNav = ()=>{
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="listPageNav">
|
<div className='listPageNav'>
|
||||||
{renderLayoutModeOptions()}
|
{renderLayoutModeOptions()}
|
||||||
{renderThemePicker()}
|
{renderThemePicker()}
|
||||||
{renderSortOptions()}
|
{renderSortOptions()}
|
||||||
@@ -347,7 +347,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='sitePage listPage'>
|
<div className='sitePage listPage'>
|
||||||
@@ -355,7 +355,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], page
|
|||||||
|
|
||||||
{renderNav()}
|
{renderNav()}
|
||||||
|
|
||||||
<div className={`content V3 ${themeMode + 'Mode'}`}>
|
<div className={`content V3 ${`${themeMode}Mode`}`}>
|
||||||
<div className='brewCollection'>{renderBrewCollection(brewCollection)}</div>
|
<div className='brewCollection'>{renderBrewCollection(brewCollection)}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user