Commit 6dc3cda2 authored by jakeburden's avatar jakeburden

Use constants strings to set state

parent 1c35f0b5
...@@ -17,14 +17,16 @@ export const PAGE_SIZE = 20; ...@@ -17,14 +17,16 @@ export const PAGE_SIZE = 20;
export const ASCENDING_ODER = 'asc'; export const ASCENDING_ODER = 'asc';
export const DESCENDING_ORDER = 'desc'; export const DESCENDING_ORDER = 'desc';
export const RELEASED_AT = 'released_at';
export const CREATED_AT = 'created_at';
export const SORT_OPTIONS = [ export const SORT_OPTIONS = [
{ {
orderBy: 'released_at', orderBy: RELEASED_AT,
label: __('Released date'), label: __('Released date'),
}, },
{ {
orderBy: 'created_at', orderBy: CREATED_AT,
label: __('Created date'), label: __('Created date'),
}, },
]; ];
import { DESCENDING_ORDER, RELEASED_AT } from '../../../constants';
export default ({ export default ({
projectId, projectId,
projectPath, projectPath,
...@@ -17,7 +19,7 @@ export default ({ ...@@ -17,7 +19,7 @@ export default ({
restPageInfo: {}, restPageInfo: {},
graphQlPageInfo: {}, graphQlPageInfo: {},
sorting: { sorting: {
sort: 'desc', sort: DESCENDING_ORDER,
orderBy: 'released_at', orderBy: RELEASED_AT,
}, },
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment