Created
June 21, 2022 09:07
-
-
Save adityatyagi/ca97cbec38d160f7702f57403daf401c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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