I’ve got a blog article page setup and I want to return articles of a related to the category that the current user is on, in async I have:
const post = (await $prismic.api.getByUID(‘post’, params.uid)).data
const categoryPosts = await $prismic.api.query([
and the return
categoryPosts is working with the blog_category ID XtemFBIAACQAN3am hardcoded, it will return all blog posts specifcally with the category ID, but I want it to return that ID based main documents selected category so that it would be dynamic.
bog_category is a relationship field set up on the post constrained to the custom type: category