Updated
This commit is contained in:
@@ -9,7 +9,9 @@ const id = route.params.id as string | undefined;
|
|||||||
|
|
||||||
const { suspense } = useGetProduct(id);
|
const { suspense } = useGetProduct(id);
|
||||||
|
|
||||||
onServerPrefetch(async () => {
|
// ssr
|
||||||
|
|
||||||
|
await useAsyncData(async () => {
|
||||||
const response = await suspense();
|
const response = await suspense();
|
||||||
|
|
||||||
if (response.isError) {
|
if (response.isError) {
|
||||||
@@ -23,7 +25,7 @@ onServerPrefetch(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="w-full flex flex-col">
|
<div class="w-full flex flex-col gap-20">
|
||||||
<ProductHero />
|
<ProductHero />
|
||||||
<ProductVideo />
|
<ProductVideo />
|
||||||
<ProductComments />
|
<ProductComments />
|
||||||
|
|||||||
Reference in New Issue
Block a user