Merge !120: the equipment filter survives a body-part change in the exercise picker, #150 (ErrorUsernameAlreadyTaken)
This commit is contained in:
commit
f472f37c3d
3 files changed
+74
-3
No files matched your search
@@ -47,9 +47,12 @@ export default function Library() {
|
||||
{showAll ? t('Filter by "{0}"', profile.name) : t('Show all equipment')}
|
||||
</button>
|
||||
</div>}
|
||||
{/* Changing body part keeps the equipment filter (issue #71): the eqOn fallback above drops
|
||||
it only for the current view if the new body part has nothing under it, without forgetting
|
||||
the choice. "All" clears it, since it spans every body part. */}
|
||||
<div className="chips" ref={bpStrip} style={{ marginBottom: eqOpts.length > 1 ? 8 : 12 }}>
|
||||
<button className={'chip nocap' + (!bp ? ' on' : '')} onClick={() => { setBp(''); setEq(''); setShown(40) }}>{t('All')}</button>
|
||||
{BODYPARTS.map(b => <button key={b} className={'chip' + (bp === b ? ' on' : '')} onClick={() => { setBp(b); setEq(''); setShown(40) }}>{t(b)}</button>)}
|
||||
{BODYPARTS.map(b => <button key={b} className={'chip' + (bp === b ? ' on' : '')} onClick={() => { setBp(b); setShown(40) }}>{t(b)}</button>)}
|
||||
</div>
|
||||
{eqOpts.length > 1 && <div className="chips" ref={eqStrip} style={{ marginBottom: 12 }}>
|
||||
<button className={'chip nocap' + (!eqOn ? ' on' : '')} onClick={() => { setEq(''); setShown(40) }}>{t('Any equipment')}</button>
|
||||
|
||||
Reference in new issue
Block a user