0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-19 03:22:45 +00:00

Simplified sort arrow, removed duplicate "onClick"

This commit is contained in:
Trevor Buckner
2022-09-25 22:20:44 -04:00
parent 3754468cf4
commit 910868cfdb
3 changed files with 8 additions and 14 deletions

View File

@@ -121,14 +121,8 @@ const ListPage = createClass({
>
{`${sortTitle}`}
</button>
{this.state.sortType == sortValue ?
<button
onClick={this.handleSortDirChange}
className='sortDir'
>
{this.state.sortDir == 'asc' ? <i className='fas fa-sort-up'></i> : <i className='fas fa-sort-down'></i>}
</button>
: ''
{this.state.sortType == sortValue &&
<i className={`sortDir fas ${this.state.sortDir == 'asc' ? 'fa-sort-up' : 'fa-sort-down'}`}></i>
}
</div>;
},