I am trying to figure out a way to map both slugs and paths in order to get all their values in the params :
This is my code :
export async function getStaticPaths() {
const slugs = await client.fetch(
`*[_type == "comic" && defined(slug.current)][].slug.current`
)
const paths = await client.fetch(
`*[_type == "comic"][].chapters[].number`
)
return {
paths: paths.map((number : any) => ({params: {number: number, slug: slugs}})), //Here I have to change this piece of code to get number and slug as params
fallback: false,
}
}