"use client"
const getData = async () => {
const response = await fetch("http://localhost:3000/api/generate", {
method: "POST",
})
const data = await response.json()
return data
}
export default async function Home() {
const data = await getData()
return (
<main>
page
</main>
)
}
"use client"
const getData = async () => {
const response = await fetch("http://localhost:3000/api/generate", {
method: "POST",
})
const data = await response.json()
return data
}
export default async function Home() {
const data = await getData()
return (
<main>
page
</main>
)
}