Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Mar 23, 2024
1 parent 399e058 commit 4e513a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions modern/src/settings/MaintenancePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ const MaintenancePage = () => {
if (item.type.endsWith('Time')) {
if (start) {
return dayjs(value).locale('en').format('YYYY-MM-DD');
} else {
return value / 86400000;
}
} else if (attribute && attribute.dataType) {
return value / 86400000;
}
if (attribute && attribute.dataType) {
switch (attribute.dataType) {
case 'speed':
return speedFromKnots(value, speedUnit);
Expand All @@ -94,10 +94,9 @@ const MaintenancePage = () => {
if (item.type.endsWith('Time')) {
if (start) {
return dayjs(value, 'YYYY-MM-DD').valueOf();
} else {
return value * 86400000;
}
} else if (attribute && attribute.dataType) {
return value * 86400000;
} if (attribute && attribute.dataType) {
switch (attribute.dataType) {
case 'speed':
return speedToKnots(value, speedUnit);
Expand Down
6 changes: 3 additions & 3 deletions modern/src/settings/MaintenancesPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const MaintenacesPage = () => {
if (key.endsWith('Time')) {
if (start) {
return dayjs(value).locale('en').format('YYYY-MM-DD');
} else {
return `${value / 86400000} ${t('sharedDays')}`;
}
} else if (attribute && attribute.dataType) {
return `${value / 86400000} ${t('sharedDays')}`;
}
if (attribute && attribute.dataType) {
switch (attribute.dataType) {
case 'speed':
return formatSpeed(value, speedUnit, t);
Expand Down

0 comments on commit 4e513a8

Please sign in to comment.