const getReviews = async () => {
const response = await useFetch(`/api/item/${props.item.id}/reviews`, {
headers: useRequestHeaders(['cookie'])
})
...
}
onMounted(async () => {
await nextTick()
await getReviews()
})
const getReviews = async () => {
const response = await useFetch(`/api/item/${props.item.id}/reviews`, {
headers: useRequestHeaders(['cookie'])
})
...
}
onMounted(async () => {
await nextTick()
await getReviews()
})