diff --git a/apps/staking/src/components/Dashboard/index.tsx b/apps/staking/src/components/Dashboard/index.tsx index b505daecff..eb4ea3e31e 100644 --- a/apps/staking/src/components/Dashboard/index.tsx +++ b/apps/staking/src/components/Dashboard/index.tsx @@ -144,10 +144,10 @@ export const Dashboard = ({ className="group border-neutral-600/50 data-[empty]:my-[5dvh] data-[empty]:border data-[empty]:bg-white/10 data-[empty]:p-4 sm:p-4 data-[empty]:sm:my-0 data-[empty]:sm:border-0 data-[empty]:sm:bg-transparent data-[empty]:sm:p-0" {...(tab === TabIds.Empty && { "data-empty": true })} > -

+

Choose Your Journey

- + -
+
{longText} {shortText}
-
+
diff --git a/apps/staking/src/components/OracleIntegrityStaking/index.tsx b/apps/staking/src/components/OracleIntegrityStaking/index.tsx index 2bc23ce95b..702ed71d8d 100644 --- a/apps/staking/src/components/OracleIntegrityStaking/index.tsx +++ b/apps/staking/src/components/OracleIntegrityStaking/index.tsx @@ -582,12 +582,9 @@ const PublisherList = ({ const scrollTarget = useRef(null); const [search, setSearch] = useState(""); const [yoursFirst, setYoursFirst] = useState(true); - const [sort, setSort] = useState({ - field: SortField.PoolUtilization, - descending: true, - }); + const [sort, setSort] = useState(SortOption.RemainingPoolDescending); const filter = useFilter({ sensitivity: "base", usage: "search" }); - const [currentPage, setPage] = useState(0); + const [currentPage, setPage] = useState(1); const filteredSortedPublishers = useMemo( () => publishers @@ -607,25 +604,16 @@ const PublisherList = ({ return 1; } } - const sortResult = doSort(a, b, yieldRate, sort.field); - return sort.descending ? sortResult * -1 : sortResult; + return doSort(a, b, yieldRate, sort); }), - [ - publishers, - search, - sort.field, - sort.descending, - filter, - yieldRate, - yoursFirst, - ], + [publishers, search, sort, filter, yieldRate, yoursFirst], ); const paginatedPublishers = useMemo( () => filteredSortedPublishers.slice( + (currentPage - 1) * PAGE_SIZE, currentPage * PAGE_SIZE, - (currentPage + 1) * PAGE_SIZE, ), [filteredSortedPublishers, currentPage], ); @@ -643,7 +631,7 @@ const PublisherList = ({ const updateSearch = useCallback( (newSearch) => { setSearch(newSearch); - updatePage(0); + updatePage(1); }, [setSearch, updatePage], ); @@ -651,7 +639,7 @@ const PublisherList = ({ const updateSort = useCallback( (newSort) => { setSort(newSort); - updatePage(0); + updatePage(1); }, [setSort, updatePage], ); @@ -659,7 +647,7 @@ const PublisherList = ({ const updateYoursFirst = useCallback( (newYoursFirst) => { setYoursFirst(newYoursFirst); - updatePage(0); + updatePage(1); }, [setYoursFirst, updatePage], ); @@ -697,20 +685,13 @@ const PublisherList = ({