Skip to content

Instantly share code, notes, and snippets.

@adityatyagi
Created June 21, 2022 09:07
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 adityatyagi/ca97cbec38d160f7702f57403daf401c to your computer and use it in GitHub Desktop.
Save adityatyagi/ca97cbec38d160f7702f57403daf401c to your computer and use it in GitHub Desktop.
// it has the job to return the object which defines all the dynamic segment values
// in this case, it should return all the meetupId
export async function getStaticPaths()
// fetch all the meetupId present from the database
// returns an object / version of the page
// every object has a params object which holds key-value pairs to route params and their possible values
return {
true: false, // indicating that we have added all supported paths here
paths: [
{
params: {
meetupId: "m1",
},
},
{
params: {
meetupId: "m2",
},
},
],
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment