diff options
| author | woxtu <woxtup@gmail.com> | 2024-06-22 12:40:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-22 12:40:00 +0900 |
| commit | 4d2eddec2e95587f7e4ec4ed79b6392a203d8789 (patch) | |
| tree | b5cc35eb54bd33be8ccb7bd1fea2054c284508e4 /packages/frontend/src/components/global/MkTime.vue | |
| parent | test(frontend): fix component error in `MkChart` story (#14056) (diff) | |
| download | misskey-4d2eddec2e95587f7e4ec4ed79b6392a203d8789.tar.gz misskey-4d2eddec2e95587f7e4ec4ed79b6392a203d8789.tar.bz2 misskey-4d2eddec2e95587f7e4ec4ed79b6392a203d8789.zip | |
Replace with `vue/no-setup-props-reactivity-loss` rule (#14062)
Diffstat (limited to 'packages/frontend/src/components/global/MkTime.vue')
| -rw-r--r-- | packages/frontend/src/components/global/MkTime.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/components/global/MkTime.vue b/packages/frontend/src/components/global/MkTime.vue index 23fe99bd9c..027b226f3f 100644 --- a/packages/frontend/src/components/global/MkTime.vue +++ b/packages/frontend/src/components/global/MkTime.vue @@ -41,12 +41,12 @@ function getDateSafe(n: Date | string | number) { } } -// eslint-disable-next-line vue/no-setup-props-destructure +// eslint-disable-next-line vue/no-setup-props-reactivity-loss const _time = props.time == null ? NaN : getDateSafe(props.time).getTime(); const invalid = Number.isNaN(_time); const absolute = !invalid ? dateTimeFormat.format(_time) : i18n.ts._ago.invalid; -// eslint-disable-next-line vue/no-setup-props-destructure +// eslint-disable-next-line vue/no-setup-props-reactivity-loss const now = ref(props.origin?.getTime() ?? Date.now()); const ago = computed(() => (now.value - _time) / 1000/*ms*/); |