I'm fetching news articles from The Guardian API. Article id's are like this: "world/live/2020/dec/31/coronavirus-covid-live-news-updates-vaccine-lockdown"
I need to go from article summary to article details and I'm using React Router for this. If I use const { id } = useParams();
and console log it, it gets only gets "world" form the id. How can I get the full id?
<Route path="/:id" component={ArticlePage} />
{topStories.map((story) => (
<Link to={`/${story.id}`}>
<ImageCard key={story.id} story={story} />
</Link>
))}