I’ve been fighting for a few hours with a preview, and I figured I’d check in here. I am creating a grid container that has a content array that will accept references to...
Last updated: Feb 1, 2021
I’ve been fighting for a few hours with a preview, and I figured I’d check in here. I am creating a grid container that has a content array that will accept references to tools, or to cards. I would like for the preview to show the title, and have a subtitle that shows a few of the referenced tools or cards. I have created a function that returns the correct values, but it doesn’t actually work in the preview because the return is an object. It’s also really gross, and I think that there has to be a better way to do this, and I am hopeful that someone can help me to find it.
As I had suspected, I was seriously overthinking this. My main man
saved the day on this one, and really helped me to find the solution. It was much simpler than I thought. Thanks a bunch for that, Man! It’s in the docs, and I wasn’t seeing things clearly. https://www.sanity.io/docs/previews-list-views Solution is: