diff --git a/web/frontend/src/components/AttemptList.vue b/web/frontend/src/components/AttemptList.vue index 6a32655..3598162 100644 --- a/web/frontend/src/components/AttemptList.vue +++ b/web/frontend/src/components/AttemptList.vue @@ -12,12 +12,6 @@ import { Component, Prop, Vue } from 'vue-property-decorator'; import { BvTableFieldArray, BvTableFormatterCallback } from 'bootstrap-vue'; import { LoginAttempt } from '@/apiary/apiary'; -const timeFormatter: BvTableFormatterCallback = (value: string): string => { - const d = new Date(value); - const s = `${d.getUTCHours}:${d.getUTCMinutes}:${d.getUTCSeconds}`; - return s; -}; - @Component export default class AttemptList extends Vue { @Prop() private items!: LoginAttempt[]; @@ -28,7 +22,10 @@ export default class AttemptList extends Vue { { key: 'date', sortable: true, - formatter: timeFormatter, + formatter: (value: string): string => { + const d = new Date(value); + return `${d.getUTCHours()}:${d.getUTCMinutes()}:${d.getUTCSeconds()}`; + }, sortByFormatted: false, }, {