mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-15 16:48:54 +00:00
Lint listpage
This commit is contained in:
@@ -187,7 +187,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navI
|
|||||||
if(filterTags?.length == 0) return;
|
if(filterTags?.length == 0) return;
|
||||||
return (
|
return (
|
||||||
<div className='tags-container'>
|
<div className='tags-container'>
|
||||||
Tags:
|
Tags:
|
||||||
{_.map(filterTags, (tag, idx)=>{
|
{_.map(filterTags, (tag, idx)=>{
|
||||||
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
|
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
|
||||||
return (
|
return (
|
||||||
@@ -198,7 +198,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navI
|
|||||||
updateUrl(filterString, sortType, sortDir, tag);
|
updateUrl(filterString, sortType, sortDir, tag);
|
||||||
}}>
|
}}>
|
||||||
{matches[2]}
|
{matches[2]}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
@@ -298,8 +298,8 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navI
|
|||||||
<div className='radio-toggle layout-container'>
|
<div className='radio-toggle layout-container'>
|
||||||
<h6>View:</h6>
|
<h6>View:</h6>
|
||||||
<label className='option' title='grid'>
|
<label className='option' title='grid'>
|
||||||
<input name='layout-mode' type='radio' onChange={(e)=>handleLayoutChange(e, 'grid')} checked={layoutMode === 'grid'} />
|
<input name='layout-mode' type='radio' onChange={(e)=>handleLayoutChange(e, 'grid')} checked={layoutMode === 'grid'} />
|
||||||
<i className='fac compressed-grid'></i>
|
<i className='fac compressed-grid'></i>
|
||||||
</label>
|
</label>
|
||||||
<label className='option' title='list'>
|
<label className='option' title='list'>
|
||||||
<input name='layout-mode' type='radio' onChange={(e)=>handleLayoutChange(e, 'list')} checked={layoutMode === 'list'} />
|
<input name='layout-mode' type='radio' onChange={(e)=>handleLayoutChange(e, 'list')} checked={layoutMode === 'list'} />
|
||||||
@@ -320,24 +320,24 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navI
|
|||||||
};
|
};
|
||||||
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()}
|
||||||
@@ -345,8 +345,8 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navI
|
|||||||
{renderTagsOptions()}
|
{renderTagsOptions()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='sitePage listPage'>
|
<div className='sitePage listPage'>
|
||||||
@@ -354,7 +354,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navI
|
|||||||
|
|
||||||
{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