claim_search: support ordering by 'name'

This commit is contained in:
infinite-persistence 2022-02-28 13:54:07 +08:00 committed by Thomas Zarebczan
parent 54f8bd35b3
commit 1249b0394e
2 changed files with 6 additions and 0 deletions

View file

@ -573,6 +573,9 @@ function ClaimListDiscover(props: Props) {
case CS.ORDER_BY_NEW_ASC: case CS.ORDER_BY_NEW_ASC:
order_by = CS.ORDER_BY_NEW_ASC_VALUE; order_by = CS.ORDER_BY_NEW_ASC_VALUE;
break; break;
case CS.ORDER_BY_NAME_ASC:
order_by = CS.ORDER_BY_NAME_ASC_VALUE;
break;
default: default:
order_by = CS.ORDER_BY_TOP_VALUE; order_by = CS.ORDER_BY_TOP_VALUE;
} }

View file

@ -39,6 +39,9 @@ export const ORDER_BY_NEW_VALUE = ['release_time'];
export const ORDER_BY_NEW_ASC = 'new_asc'; export const ORDER_BY_NEW_ASC = 'new_asc';
export const ORDER_BY_NEW_ASC_VALUE = ['^release_time']; export const ORDER_BY_NEW_ASC_VALUE = ['^release_time'];
export const ORDER_BY_NAME_ASC = 'name_asc';
export const ORDER_BY_NAME_ASC_VALUE = ['^name'];
// @note: These are used to build the default controls available on claim listings. // @note: These are used to build the default controls available on claim listings.
export const ORDER_BY_TYPES = [ORDER_BY_NEW, ORDER_BY_TRENDING, ORDER_BY_TOP]; export const ORDER_BY_TYPES = [ORDER_BY_NEW, ORDER_BY_TRENDING, ORDER_BY_TOP];