Skip to content

Instantly share code, notes, and snippets.

@gabrielEloy
Created July 4, 2021 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielEloy/03386bd0f85631ddb6585c7f8774d221 to your computer and use it in GitHub Desktop.
Save gabrielEloy/03386bd0f85631ddb6585c7f8774d221 to your computer and use it in GitHub Desktop.
export async function getServerSideProps() {
const parseQuery = new Parse.Query("Message");
parseQuery.ascending("createdAt");
parseQuery.greaterThanOrEqualTo('createdAt', new Date());
return {
props: {
parseQuery: await encodeParseQuery(parseQuery), // Return encoded Parse Query for server side rendering
},
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment