Skip to content

Commit 5f23277

Browse files
authored
Merge pull request #1842 from kleros/chore/sort-disputes-by-id
chore: sort disputes by id instead of latest status change
2 parents 4324611 + 1f7c36f commit 5f23277

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Diff for: web/src/hooks/queries/useCasesQuery.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export type { CasesPageQuery, DisputeDetailsFragment };
1717
export const disputeFragment = graphql(`
1818
fragment DisputeDetails on Dispute {
1919
id
20+
disputeID
2021
arbitrated {
2122
id
2223
}
@@ -34,15 +35,15 @@ export const disputeFragment = graphql(`
3435

3536
const casesQueryWhere = graphql(`
3637
query CasesPageWhere($skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection, $first: Int) {
37-
disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {
38+
disputes(first: $first, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection, where: $where) {
3839
...DisputeDetails
3940
}
4041
}
4142
`);
4243

4344
const casesQuery = graphql(`
4445
query CasesPage($skip: Int, $orderDirection: OrderDirection, $first: Int) {
45-
disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {
46+
disputes(first: $first, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection) {
4647
...DisputeDetails
4748
}
4849
}
@@ -51,7 +52,7 @@ const casesQuery = graphql(`
5152
const myCasesQuery = graphql(`
5253
query MyCases($id: ID!, $skip: Int, $orderDirection: OrderDirection) {
5354
user(id: $id) {
54-
disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {
55+
disputes(first: 3, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection) {
5556
...DisputeDetails
5657
}
5758
}
@@ -61,7 +62,7 @@ const myCasesQuery = graphql(`
6162
const myCasesQueryWhere = graphql(`
6263
query myCasesPageWhere($id: ID!, $skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection) {
6364
user(id: $id) {
64-
disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {
65+
disputes(first: 3, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection, where: $where) {
6566
...DisputeDetails
6667
}
6768
}

0 commit comments

Comments
 (0)