Skip to content

Commit

Permalink
fix(forum): sort
Browse files Browse the repository at this point in the history
  • Loading branch information
ariunzayarin committed Apr 20, 2023
1 parent aa83845 commit 9eea7c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions packages/plugin-forum-ui/src/containers/pages/List.tsx
Expand Up @@ -41,10 +41,7 @@ function PagesList({
const { data, loading, error } = useQuery(gql(queries.pages), {
fetchPolicy: 'network-only',
variables: {
sort: {
code: 1,
listOrder: 1
},
sort: { [queryParams.sortField]: queryParams.sortDirection },
limit,
offset
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-forum-ui/src/containers/posts/List.tsx
Expand Up @@ -38,7 +38,7 @@ function List({ removeMutation, queryParams, history }: FinalProps) {
state,
categoryApprovalState,
categoryIncludeDescendants: !!categoryIncludeDescendants,
sort: { createdAt: -1 },
sort: { [queryParams.sortField]: queryParams.sortDirection },
limit,
offset
};
Expand Down
4 changes: 1 addition & 3 deletions packages/plugin-forum-ui/src/containers/quiz/List.tsx
Expand Up @@ -20,9 +20,7 @@ const QuizList = ({ queryParams }: Props) => {
const { data, loading, error } = useQuery(gql(queries.quizzesList), {
fetchPolicy: 'network-only',
variables: {
sort: {
_id: -1
},
sort: { [queryParams.sortField]: queryParams.sortDirection },
limit,
offset
}
Expand Down

0 comments on commit 9eea7c5

Please sign in to comment.