fix: data.preview, data.value Object is possibly 'null'. (#63)
This commit is contained in:
1 parent
5b74fdd684
commit
aa66af82a8
1 file changed
+2
-2
@@ -1,12 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
const { data } = await useFetch('/api/pageview')
|
||||
|
||||
const time = useTimeAgo(computed(() => data.value.startAt))
|
||||
const time = useTimeAgo(computed(() => data.value!.startAt))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div text-gray:80>
|
||||
<span font-500 text-gray>{{ data.pageview }}</span>
|
||||
<span font-500 text-gray>{{ data!.pageview }}</span>
|
||||
page views since
|
||||
<span text-gray>{{ time }}</span>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user