aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-02-14 13:40:40 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-02-14 13:40:40 +0530
commit5970936c860285576848d170dd91bfcc488c941e (patch)
tree087d399c90f29743f0250cbf45616027f6bb191b /modern/src/reports
parent3e5ef37008fd009821181b1d539622a44b8cd745 (diff)
downloadtrackermap-web-5970936c860285576848d170dd91bfcc488c941e.tar.gz
trackermap-web-5970936c860285576848d170dd91bfcc488c941e.tar.bz2
trackermap-web-5970936c860285576848d170dd91bfcc488c941e.zip
Code improvement and deduplication
Diffstat (limited to 'modern/src/reports')
-rw-r--r--modern/src/reports/ChartReportPage.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/reports/ChartReportPage.js b/modern/src/reports/ChartReportPage.js
index 543c8a9e..80424cce 100644
--- a/modern/src/reports/ChartReportPage.js
+++ b/modern/src/reports/ChartReportPage.js
@@ -5,7 +5,7 @@ import ReportFilter from './ReportFilter';
import Graph from './Graph';
import { useAttributePreference } from '../common/preferences';
import { formatDate } from '../common/formatter';
-import { speedConverter } from '../common/converter';
+import { speedFromKnots } from '../common/converter';
import t from '../common/localization';
const Filter = ({ children, setItems }) => {
@@ -19,7 +19,7 @@ const Filter = ({ children, setItems }) => {
const positions = await response.json();
let formattedPositions = positions.map(position => {
return {
- speed: Number(speedConverter(position.speed, speedUnit)),
+ speed: Number(speedFromKnots(position.speed, speedUnit)),
altitude: position.altitude,
accuracy: position.accuracy,
fixTime: formatDate(position.fixTime)