Soy bastante nuevo en la cordura. Solo quiero saber cómo conectarlo a un proyecto nativo de reacción usando expo.
Intenté agregar 'exp://192.168.1.23:19000' en Cors de cordura. Pero no aceptó 'exp://'
¿Hay alguna manera de agregar un proyecto de exposición en Sanity Cors?
Inicio.js
import React from 'react'; import client from '../client'; import { urlFor } from '../client'; export const getData = async () => { const query = `*[_type == "upload"]` const uploads = await client.fetch(query); return{ props: { uploads } } } export const Test = ({ upload: { image } }) => { return( <Image source={urlFor(image)} style={{ height: 250, width: 250 }} /> ); } const Home = ({ uploads }) => { return ( <SafeAreaView> <View style={{ flex:1, justifyContent: "center", alignContent: "center" }}> {uploads?.map( (upload) => <Test key={upload._id} upload={upload} /> )} </View> </SafeAreaView> ) } export default Home;cliente.js
import sanityClient from "@sanity/client"; import imageUrlBuilder from "@sanity/image-url"; const client = sanityClient({ projectId: "myProjectId", dataset: "production", apiVersion: "2022-03-10", useCdn: true, token: "myToken", }); // All the fields that dont have the required value like 'myToken', I just removed them for security reasons const builder = imageUrlBuilder(client); export const urlFor = (source) => builder.image(source);