Skip to content

Commit

Permalink
Set default sort for wipe length
Browse files Browse the repository at this point in the history
  • Loading branch information
Shebuka committed Mar 14, 2024
1 parent 040c3dc commit e0acc44
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/wipe-length/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ const WipeLength = (props) => {
return [
{
Header: t('Patch'),
id: 'name',
accessor: 'name',
},
{
Header: t('Wipe start'),
id: 'start',
accessor: ({ start }) => {
if (start) {
return dayjs(start).format('YYYY-MM-DD');
Expand All @@ -33,10 +35,10 @@ const WipeLength = (props) => {
return '';
},
Cell: CenterCell,
id: 'start',
},
{
Header: t('Wipe end'),
id: 'end',
accessor: ({ end, ongoing }) => {
if (ongoing) {
return t('Ongoing wipe');
Expand All @@ -47,10 +49,10 @@ const WipeLength = (props) => {
return '';
},
Cell: CenterCell,
id: 'end',
},
{
Header: t('Wipe length'),
id: 'wipeLength',
accessor: 'lengthDays',
Cell: (props) => {
const { value } = props;
Expand Down Expand Up @@ -104,6 +106,8 @@ const WipeLength = (props) => {
columns={columns}
data={data}
disableSortBy={false}
sortBy={'start'}
sortByDesc={true}
/>
{}
</div>
Expand Down

0 comments on commit e0acc44

Please sign in to comment.