Limit the amount of bets and comments sent to the client through getStaticProps
This commit is contained in:
parent
d9279e42cc
commit
be64bf71a7
|
@ -65,8 +65,9 @@ export async function getStaticPropz(props: {
|
||||||
contract,
|
contract,
|
||||||
username,
|
username,
|
||||||
slug: contractSlug,
|
slug: contractSlug,
|
||||||
bets,
|
// Limit the data sent to the client. Client will still load all bets and comments directly.
|
||||||
comments,
|
bets: bets.slice(0, 5000),
|
||||||
|
comments: comments.slice(0, 1000),
|
||||||
},
|
},
|
||||||
|
|
||||||
revalidate: 60, // regenerate after a minute
|
revalidate: 60, // regenerate after a minute
|
||||||
|
|
Loading…
Reference in New Issue
Block a user