🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Fix users page (sorting) (#114)
Andrii Andrushchyshynf4ca270abe2d
diff --git a/client/src/app/[site]/users/page.tsx b/client/src/app/[site]/users/page.tsxindex 1e907a256..72d0e6e97 100644--- a/client/src/app/[site]/users/page.tsx+++ b/client/src/app/[site]/users/page.tsx@@ -50,7 +50,7 @@ const SortHeader = ({ column, children }: any) => {return (<Buttonvariant="ghost"- onClick={() => column.toggleSorting(isSorted === "asc")}+ onClick={() => column.toggleSorting(isSorted ? isSorted === "asc" : true)}className="p-0 hover:bg-transparent">{children}diff --git a/server/src/api/analytics/getUsers.ts b/server/src/api/analytics/getUsers.tsindex a6aec13f7..b12b2cd99 100644--- a/server/src/api/analytics/getUsers.ts+++ b/server/src/api/analytics/getUsers.ts@@ -110,7 +110,7 @@ WITH AggregatedUsers AS (SELECT *FROM AggregatedUsersWHERE 1 = 1 ${filterStatement}-ORDER BY {sortBy:String} ${actualSortOrder}+ORDER BY ${actualSortBy} ${actualSortOrder}LIMIT {limit:Int32} OFFSET {offset:Int32}`;@@ -135,8 +135,6 @@ WHEREsiteId: Number(site),limit: pageSizeNum,offset,- sortBy: actualSortBy,- sortOrder: actualSortOrder,},}),clickhouse.query({