Skip to content

chore: sort disputes by id instead of latest status change #1842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions web/src/hooks/queries/useCasesQuery.ts
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ export type { CasesPageQuery, DisputeDetailsFragment };
export const disputeFragment = graphql(`
fragment DisputeDetails on Dispute {
id
disputeID
arbitrated {
id
}
@@ -34,15 +35,15 @@ export const disputeFragment = graphql(`

const casesQueryWhere = graphql(`
query CasesPageWhere($skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection, $first: Int) {
disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {
disputes(first: $first, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection, where: $where) {
...DisputeDetails
}
}
`);

const casesQuery = graphql(`
query CasesPage($skip: Int, $orderDirection: OrderDirection, $first: Int) {
disputes(first: $first, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {
disputes(first: $first, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection) {
...DisputeDetails
}
}
@@ -51,7 +52,7 @@ const casesQuery = graphql(`
const myCasesQuery = graphql(`
query MyCases($id: ID!, $skip: Int, $orderDirection: OrderDirection) {
user(id: $id) {
disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection) {
disputes(first: 3, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection) {
...DisputeDetails
}
}
@@ -61,7 +62,7 @@ const myCasesQuery = graphql(`
const myCasesQueryWhere = graphql(`
query myCasesPageWhere($id: ID!, $skip: Int, $where: Dispute_filter, $orderDirection: OrderDirection) {
user(id: $id) {
disputes(first: 3, skip: $skip, orderBy: lastPeriodChange, orderDirection: $orderDirection, where: $where) {
disputes(first: 3, skip: $skip, orderBy: disputeID, orderDirection: $orderDirection, where: $where) {
...DisputeDetails
}
}