Skip to content

Commit

Permalink
Set createdAt and updatedAt as default
Browse files Browse the repository at this point in the history
  • Loading branch information
runely committed May 25, 2022
1 parent 02876ee commit be0585b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useAPI/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function useAPI (defaultDatabase, defaultQueue = [], defaultItems
const options = useMemo(() => {
return {
filter: [],
orderBy: ['createdTimestamp'],
orderBy: ['createdAt'],
order: 'desc',
...itemsOptions
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Queue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ export function Queue () {
},
{
label: 'Created',
onClick: () => handleSortClick(['createdTimestamp']),
onClick: () => handleSortClick(['createdAt']),
itemTooltip: 'createdAt',
itemRender: (value, item, header, index) => <div>{relativeDateFormat({ toDate: new Date(item.createdAt || item.createdTimestamp), locale: 'no', options: { } })}</div>
},
{
label: 'Modified',
onClick: () => handleSortClick(['modifiedTimestamp']),
onClick: () => handleSortClick(['updatedAt']),
itemTooltip: 'updatedAt',
itemRender: (value, item, header, index) => <div>{relativeDateFormat({ toDate: item.updatedAt || item.modifiedTimestamp, locale: 'no' })}</div>
},
Expand Down

0 comments on commit be0585b

Please sign in to comment.