Skip to content

Commit

Permalink
sort by date by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ramirotw committed Apr 28, 2020
1 parent 6fcc371 commit d15fc80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/containers/VoterHistory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const getHomeVariables = data => {
}

const descendantTimestampSort = (a, b) => (a.timestamp > b.timestamp ? 1 : -1)
const defaultSort = [{ desc: true, id: 'date' }]

function VoterHistory(props: Props) {
const { match, history } = props
Expand Down Expand Up @@ -134,7 +135,7 @@ function VoterHistory(props: Props) {
return (
<>
<PageTitle>{`Voter History - ${voterId}`}</PageTitle>
<List handleRow={getItem} data={[...executives, ...polls]} columns={historyColumns} />
<List handleRow={getItem} data={[...executives, ...polls]} columns={historyColumns} sortBy={defaultSort} />
</>
)
}
Expand Down

0 comments on commit d15fc80

Please sign in to comment.