diff --git a/app/components/home/live/Stats.vue b/app/components/home/live/Stats.vue index b51f369..41f6c98 100644 --- a/app/components/home/live/Stats.vue +++ b/app/components/home/live/Stats.vue @@ -4,7 +4,7 @@ import { usePrecision } from '@vueuse/math' const { data: stats } = await useAsyncData('stats', () => $fetch('/api/stats')) -const startDate = computed(() => new Date(stats.value?.coding.range.start || '')) +const startDate = computed(() => new Date(stats.value?.coding?.range?.start ?? new Date())) const yearsCollected = useTimeAgo(startDate) const formattedDate = useDateFormat(startDate, 'MMM DD, YYYY') @@ -21,6 +21,8 @@ const topOS = computed(() => stats.value?.os.slice(0, 2) ?? []) v-if="stats" class="space-y-6" > + {{ stats.coding.range.start }} + {{ startDate }}