From 52b6ff55d0af8b2c975656840f69efaf216bf418 Mon Sep 17 00:00:00 2001 From: hassnian Date: Tue, 9 Jan 2024 17:12:27 +0500 Subject: [PATCH] ref: price sort logic --- components/items/ItemsGrid/useItemsGrid.ts | 18 ------------------ locales/en.json | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/components/items/ItemsGrid/useItemsGrid.ts b/components/items/ItemsGrid/useItemsGrid.ts index 1c5800fe9a..ff5fc50822 100644 --- a/components/items/ItemsGrid/useItemsGrid.ts +++ b/components/items/ItemsGrid/useItemsGrid.ts @@ -131,24 +131,6 @@ export function useFetchSearch({ orderBy: getRouteQueryOrDefault(route.query.sort, ['blockNumber_DESC']), } - const isPriceSortActive = (sort?: string | null | (string | null)[]) => { - if (!sort) { - return false - } - const sortArray = Array.isArray(sort) ? sort : [sort] - return sortArray.some((sortBy) => (sortBy ?? '').includes('price')) - } - watch( - () => route.query.sort, - (newSort, oldSort) => { - const priceSortHasBeenActivated = - isPriceSortActive(newSort) && !isPriceSortActive(oldSort) - if (priceSortHasBeenActivated && route.query.listed !== 'true') { - route.query.listed = 'true' - } - }, - ) - const searchForToken = getSearchCriteria( search?.length ? search : searchParams.value, ) diff --git a/locales/en.json b/locales/en.json index 4dd90b9559..ff120d92f3 100644 --- a/locales/en.json +++ b/locales/en.json @@ -418,7 +418,7 @@ "price_ASC": "Price: Low to High", "sn_ASC": "Alphabetically", "instance_ASC": "Sequence", - "listed": "Buy now", + "listed": "Listed", "own": "Own", "clearAll": "Clear All", "collection": {