Closed TejasQ closed 2 years ago
I tried a workaround with
export const getStaticProps: GetStaticProps<Props> = async () => {
const speakers = await client.db.speakers.getPaginated({
pagination: { size: 100 },
})
return {
props: { speakers: speakers.records },
revalidate: true,
}
}
(getPaginated), still no luck.
Figured it out. This is a workaround:
export const getStaticProps: GetStaticProps<Props> = async () => {
const speakers = /* 👉 */ Array.from(await client.db.speakers.getMany())
return {
props: { speakers },
revalidate: true,
}
}
I guess this goes back to the serialization topic from #387, because an Array seems to serialize fine in Next.js, but not the decorated Array the SDK uses.
Can't reproduce it... Sending the Array works just fine
Will try to debug it with your project
Hydration and SSR is just hard... This won't be the last issue we find! Fixed @TejasQ
I've received this error and I have no idea what to do with it:
Console output:
As text:
Logged to the console,
overrideRecords
is not used anywhere in my code.Calling code:
Database: https://app.xata.io/workspaces/xata-uq2d57/dbs/conf/branches/main/tables/speakers
Schema:
Actual code:
https://github.com/xataio/xataconf/blob/091bf981988095eba2d9ae51efb3bb43897c4c7e/pages/index.tsx#L34-L39