sort box fix
This commit is contained in:
@@ -11,14 +11,18 @@ export const SortTypeBox = ({
|
||||
return (
|
||||
<>
|
||||
<div className="sort-options">
|
||||
{sortOptions.map((option, index) => (
|
||||
<span key={option.key}>
|
||||
{index > 0 && <span className="sort-divider">| </span>}
|
||||
<button
|
||||
className={`sort-btn ${(sortType === option.key) ? 'active' : ''}`}
|
||||
onClick={() => onClickToSort(option.key)}
|
||||
>{option.label}</button>
|
||||
</span>
|
||||
{ sortOptions.map((option: Record<string, any>, index: number) => (
|
||||
<>
|
||||
{ (index > 0) &&
|
||||
<span className="sort-divider">|</span>
|
||||
}
|
||||
<span key={ option.key }>
|
||||
<button
|
||||
className={ `sort-btn ${(sortType === option.key) ? 'active' : ''}` }
|
||||
onClick={ () => onClickToSort(option.key) }
|
||||
>{ option.label }</button>
|
||||
</span>
|
||||
</>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user