refactor: types & performance

This commit is contained in:
2024-05-04 14:43:34 +02:00
parent 7dd1c06f3f
commit a2de0e2030
32 changed files with 349 additions and 400 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
import { defineComponent } from 'vue';
import Train from '../scripts/interfaces/Train';
import { TrainStop } from '../store/typings';
import { Train, TrainStop } from '../typings/common';
export default defineComponent({
data: () => ({
@@ -51,8 +50,8 @@ export default defineComponent({
return diffMins < 1
? this.$t('trains.last-seen-now')
: diffMins < 2
? this.$t('trains.last-seen-min')
: this.$t('trains.last-seen-ago', { minutes: diffMins });
? this.$t('trains.last-seen-min')
: this.$t('trains.last-seen-ago', { minutes: diffMins });
},
displayTrainPosition(train: Train) {