sort box fix

This commit is contained in:
focp212@naver.com
2025-10-30 15:26:43 +09:00
parent fc151af439
commit 0736c00a87

View File

@@ -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>
</>