All Questions
10
questions
1
vote
3
answers
1k
views
Access to an Array inside a Post Array with Sanity using next.js
I have an issue here trying to access a Post array that has inside a categories array. So if I console.log the data I see something like this:
{
posts: [
{
_createdAt: '2021-10-23T05:02:...
1
vote
1
answer
713
views
Cannot read properties of undefined (reading 'current') I can't get slug from array
current page not displayed
I can't get current slug from array
stack:
backend: Sanity
Frontend: Astro.build
Sanity
import { defineField, defineType } from 'sanity'
export default defineType({
...
0
votes
1
answer
2k
views
How do I turn a sanity io document field that is an array of objects to an array of strings
I have a recipes.js document that has a tag field:
{
name: 'tags',
title: 'Tags',
type: 'array',
of: [{ type: 'reference', to: { type: 'tags' } }],
options: {
...
0
votes
0
answers
99
views
How do I render a blog post as an array instead of an object in a Nextjs/Sanity Studio Blog?
This is my error:
Error: Objects are not valid as a React child (found: object with keys {_id, categories, title, _updatedAt, author, _createdAt, _rev, slug, _type}). If you meant to render a ...
0
votes
0
answers
209
views
What causes 'SyntaxError: Unexpected token u in JSON' when accessing Next.js admin at http://localhost:3000/admin?
I have been following a tutorial on YouTube (https://www.youtube.com/watch?v=OcTPaUfay5I) and I am currently at the 1:07:02 mark. The tutorial is about creating a web application using Next.js and ...
0
votes
1
answer
909
views
Objects are not valid as a React child (found: object with keys {author})
this is my sanity schema called blogs and there is one refrence field called author
so i am using blog.author to get author name on my blog getting error
code in sanity blog.js
{
name: '...
0
votes
1
answer
644
views
Looping through array within Sanity Io React
I'm using react with sanity io to create a portfolio page. I would like to create an unordered list according to how many tags I have a on a project. A project is composed of a title, image, ...
0
votes
1
answer
378
views
How do I map across a nested array of objects?
So my issue is this, I'm using Sanity.io to manage content in an illustrator's portfolio page.
I'm trying to access an image gallery I've put into every project the illustrator has done.
My data is ...
0
votes
0
answers
823
views
How do I loop over an array within a map of a GraphQL
I'm trying to loop over data from Sanity using GraphQL. I've set up my .map to loop over the larger information and return an array of everything, which is working well; however, when it comes to the ...
0
votes
1
answer
932
views
Can i merge/combine graphql API arrays into one?
Hey i'm using Sanity and have created both a allSanityPost (for my blog posts) and allSanityCases (for all my cases). Do anyone know how to combine these categories into one array and order them by ...