@@ -198,35 +283,45 @@ const MetricsPage: FC = () => {
router.replace(`/projects/dashboard/metrics?${newParams.toString()}`)
}}
/>
-
-
{
- // Reset pagination to the first page when changing ordering
- setPagination({ offset: 0, limit: PAGINATION_LIMIT })
- const newParams = new URLSearchParams(searchParams.toString())
- newParams.set('order', key)
- setOrdering({
- score: key,
- })
- setActiveOrdering([key])
- router.replace(`/projects/dashboard/metrics?${newParams.toString()}`)
- }}
- />
-
+
Project Name
-
Stars
-
Forks
-
Contributors
-
Health Checked At
-
Score
+
+
+
+
+
{loading ? (
@@ -254,13 +349,7 @@ const MetricsPage: FC = () => {
variables: {
filters,
pagination: newPagination,
- ordering: [
- ordering,
- {
- // eslint-disable-next-line @typescript-eslint/naming-convention
- project_Name: Ordering.Asc,
- },
- ],
+ ordering: buildOrderingWithTieBreaker(ordering),
},
updateQuery: (prev, { fetchMoreResult }) => {
if (!fetchMoreResult) return prev
diff --git a/frontend/src/types/__generated__/graphql.ts b/frontend/src/types/__generated__/graphql.ts
index 736a223588..88e067fe9b 100644
--- a/frontend/src/types/__generated__/graphql.ts
+++ b/frontend/src/types/__generated__/graphql.ts
@@ -475,8 +475,12 @@ export type ProjectHealthMetricsNode = Node & {
};
export type ProjectHealthMetricsOrder = {
+ contributorsCount?: InputMaybe
;
+ createdAt?: InputMaybe;
+ forksCount?: InputMaybe;
project_Name?: InputMaybe;
score?: InputMaybe;
+ starsCount?: InputMaybe;
};
export type ProjectHealthStatsNode = {