Open samwpr opened 2 years ago
same here... seems like many things aren't working well like google cloud integration as well...
I also have the same problem
using async await instead of .then worked for me.
const fetchAbouts = async () => { const query = '*[_type == "abouts"]'; setAbouts(await client.fetch(query)); }
useEffect(() => { fetchAbouts(); }, []);
This code worked for me but I don't know the logic behind this, if anyone can explain it would be great. TIA
Didn't work for me. Let me see your full code pls
using async await instead of .then worked for me.
const fetchAbouts = async () => { const query = '*[_type == "abouts"]'; setAbouts(await client.fetch(query)); }
useEffect(() => { fetchAbouts(); }, []);
This code worked for me but I don't know the logic behind this, if anyone can explain it would be great. TIA
Full code pls
using async await instead of .then worked for me. const fetchAbouts = async () => { const query = '*[_type == "abouts"]'; setAbouts(await client.fetch(query)); } useEffect(() => { fetchAbouts(); }, []); This code worked for me but I don't know the logic behind this, if anyone can explain it would be great. TIA
Full code pls
using async await instead of .then worked for me. const fetchAbouts = async () => { const query = '*[_type == "abouts"]'; setAbouts(await client.fetch(query)); } useEffect(() => { fetchAbouts(); }, []); This code worked for me but I don't know the logic behind this, if anyone can explain it would be great. TIA
Full code pls
Thanks but still stuck
Finally found the solution.
Go to Sanity Manage Project => Add CORS ORIGIN => Paste this: http://localhost:* => Select "allow credentials" => Save and you are good to go
Finally found the solution.
Go to Sanity Manage Project => Add CORS ORIGIN => Paste this: http://localhost:* => Select "allow credentials" => Save and you are good to go
Did this work for anyone?
Hi everyone, could I please ask for assistance with the following issue?
I am at this section of the youtube tutorial.
Everything was working perfectly, but once I connected to Sanity, this website section doesn't show.
I have tried the following but nothing seems to work:
While following the tutorial the only thing I did that differed from the video was at 1:48:20 of the video where after he created the .env file he reloaded the application via
ctrl c
I am on a mac so in my terminal I usedman kill
instead.Please find my code below: .env
client.js
About.jsx