I'm trying to map params into Next.js getStaticPaths
but it doesn't work. Below you can see it works.
But it doesn't work as soon as want to add one more field which is the slug of the article.
The routing looks something like this. index>[username]>[slug]
<=== slug is for article.
To simplify the code, the API looks like this.
[
{
id
username
email
},
articles: [
[Object], [Object], [Object],
]
}
]
And inside articles array looks something like this:
articles: [
{
id
title
description
slug
}
]
How do I make it work? How to map username and article's slug to param so that it works?
Edit: I want to have username slug and article slug together so that I can have www.com/[username]/[articleSlug]
.