diff --git a/components/status/StatusCard.vue b/components/status/StatusCard.vue index bc509fb6..5dea456f 100644 --- a/components/status/StatusCard.vue +++ b/components/status/StatusCard.vue @@ -36,6 +36,7 @@ function go() { router.push(getStatusPath(status)) } +const createdAt = useFormattedDateTime(status.createdAt) const timeago = useTimeAgo(() => status.createdAt, { showSecond: true, messages: { @@ -89,9 +90,11 @@ const timeago = useTimeAgo(() => status.createdAt, {
-
- {{ timeago }} -
+ +
+ {{ timeago }} +
+
diff --git a/components/status/StatusDetails.vue b/components/status/StatusDetails.vue index ad200c68..dc548e67 100644 --- a/components/status/StatusDetails.vue +++ b/components/status/StatusDetails.vue @@ -11,8 +11,7 @@ const status = $computed(() => { return props.status }) -const formatter = Intl.DateTimeFormat(undefined, { dateStyle: 'long' }) -const date = computed(() => formatter.format(new Date(status.createdAt))) +const date = useFormattedDateTime(status.createdAt)