Skip to content

Commit

Permalink
fix: Default sort by should be newest to oldest (#1295)
Browse files Browse the repository at this point in the history
* fix: Default sort by should be newest to oldest

* fix: set defaultQueryOrder to newest for files table sort

Co-authored-by: orun <orun@agencyundone.com>
  • Loading branch information
joannaong and orvn committed May 5, 2022
1 parent 04dafec commit b0da078
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useUploads } from 'components/contexts/uploadsContext';
import { useUser } from 'components/contexts/userContext';
import CheckIcon from 'assets/icons/check';

const defaultQueryOrder = 'a-z';
const defaultQueryOrder = 'newest';

/**
* @typedef {import('web3.storage').Upload} Upload
Expand Down
24 changes: 12 additions & 12 deletions packages/website/content/pages/app/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@
"sortby": {
"label": "Sort By",
"options": [
{
"label": "Newest Upload",
"value": "newest",
"direction": "NEWEST",
"compareFn": "TIMEBASED"
},
{
"label": "Oldest Upload",
"value": "oldest",
"direction": "OLDEST",
"compareFn": "TIMEBASED"
},
{
"label": "Alphabetical A-Z",
"key": "name",
Expand All @@ -152,18 +164,6 @@
"direction": "DESC",
"compareFn": "ALPHANUMERIC"
},
{
"label": "Newest Upload",
"value": "newest",
"direction": "NEWEST",
"compareFn": "TIMEBASED"
},
{
"label": "Oldest Upload",
"value": "oldest",
"direction": "OLDEST",
"compareFn": "TIMEBASED"
},
{
"label": "Largest size",
"value": "largest",
Expand Down

0 comments on commit b0da078

Please sign in to comment.