❗READ THIS FOR THE ENDING -> [CODE IS PINNED HERE] We hit a stream crash only for the last 10 minutes... to finish the build you simply have to complete the addComment.ts API endpoint & update the Tweet.tsx handleSubmit function! 1) We just needed to complete the API endpoint 2) Implement the HandleSubmit Functionality inside our Tweet component 3) Deploy to Vercel ensuring you update the environment variables correctly! (I show this in other builds!) 🌟THEN YOUR DONE! I have attached both code snippets with the finishing code inside! ENJOY 🚀 Tweet.tsx: codepen.io/sonnysangha/pen/ZErbOKZ addComment: codepen.io/sonnysangha/pen/QWQjEgV
Thank you Sonny for this wonderful build! I specially appreciated you using Typescript in this one. Typescript is becoming so popular that I feel like it’s not even worth doing any projects without it so I appreciate it a lot! I hope that there will be more Typescript builds in future. Peace and Blessings from Istanbul!
2:48:29 dude, let me tell you. I spent hours trying to understand ref, I come to this video and in less than 10 seconds I finally understand it. Such a simple concept when you explain it easily.
Not sure if anyone else was having this problem, but I used the component for the logo rather than the . The is difficult to style and needed to be wrapped in a div for styling purposes. Not sure if this is right, or if it was already mentioned. I read through many of the posts and didn't see a comment about this. I'm open to any other tips on this as well. Keep coding Papafam. I'm lovin the energy from these videos and discord.
I stopped at Twitter authentication and can't move on, I registered in Twitter, but in order to get the keys in Twitter Developer you need to link your phone number to your Twitter account, for 2 days the message from the code is supposedly sent, but in fact nothing comes...
@@SonnySangha Can you point me to deployment advice on Vercel for this? I'm slowly working through tons of dependency errors and when I deployed with no errors I got 500 Internal Server error on root. I'm now trying to go to the api endpoints: /api/getTweets works, but /api/auth/signin with Twitter worked once then gave me an error of invalid attempt...can't get back to that.
OK, I got it. The Vercel deployment worked. Now I have to test to see if Sanity is working and all the direct posting & image additions from the app itself. I'll let you know how it goes and put my Vercel link on here if all goes well.
Hi everyone! First of all! i need to say thanks for sonny to upload this majestic tutorial for us! This is teaching me a lot! but on the implementing comment funcionality i get caught up with this browser error: "Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data". Did anyone get caught with this error ? how did you solve it ?
Hey Sonny/Jay/PapaFam, enjoyed the tutorial and managed to finish it and deploy even though the video was cut short. I'm having issues with the deployed version though as the tweets are not being updated immediately (comments are fine) when posted - they appear in Sanity straight away but they appear only on page refresh.
you can mutate without using that boilerplate export async function createPost(post: Post) { const result = client.create(post) return result } export async function updateDocumentTitle(_id, title) { const result = client.patch(_id).set({title}) return result } as montioned on the docs ?
You are just amazing Sonny🔥🔥🔥...I have learnt a lot from you...I had this question that how do you build the whole app before rebuilding it live...how do you nail css part...do you read documentation... basically I wanted to know that how you learn new technologies?
Hello papa react i want to say thank you thanks to you i am excited to learn front end you know? your channel is the best I have found your explanation is very easy to understand once again thank you teacher greetings from Indonesia
Sonny- you never stop amazing me. How can we program this code to work with a blockchain wallet signer and connect it to moralis. Kindly do a video on this
Hii Sonny I am getting Type 'Comment[]' is not assignable to type'import().Comment[]' and Comment is missing the following properties from type 'Comment': in tweet.tsx Can you help me how to resolve with it. I did exactly what you did there
@@albinbinoy1994 Yes, that one was solved, i was checking with the utils hardly, but the issue was typo on GetServerSideProps, but Facing a new issue while deploying it on vercel or netlify it shows 500 internal server error at homepage, locally everythin was fine, i have set the deployed url on sanity CROS origin and also twitter developers , but it didnot solved
Can anyone tell me what is the extension Sonny uses to get the groq queries to look all nice and colorful? Mine just gives me crappy yellow string text and it's bothering the hell out of me (i know petty problems, but still)
Once again really fun build. ive gotten the app to deploy but now theres a CORS error issue i've been confronted with. The fetches go through to sanity but i must refresh the app in order to view the posts. whats the best way to approach this problem?
Does anyone encounter the problem when trying to add new comments and tweets when deployed, it sometimes respond slowly and doesn't show the newest comments or tweets on screen immediately, but everything works fine one local machine?
Greetings from Kazakhstan! Thanks buddy! Please make a pagination on TS, for example, using the example of your instagram clone. I didn't find good information about pagination and dynamic loading of posts. Thank you in advance!
Server Error TypeError: Cannot read property 'fetch' of undefined This error happened while generating the page. Any console logs will be displayed in the terminal window.
Hey. I am a new subcriber and i have follwoed along with a few of your videos. I am having issues on deployment with vercel. I have made the connections and after i build in vercel, i get an issue saying internal server error 500. I tried updating the env variables but I'm not sure which ones to use as no combination of changing localhost:3000 url to vercel urls work. Sonny please help me understand this as your video ends early. I PROMISE I WILL BUY YOUR COURSE IF YOU CAN HELP ME!
You can view your error logs by going to your Vercel dashboard, clicking on your project, and then clicking "View Function Logs". This will show errors happening in realtime. They are not persisted (they're streaming logs). Refresh the page, and you'll see your 500 error. That should tell you what the issue is. I think its a connection issue, check your connections
It’s most likely you forgetting the NEXTAUTH_SECRET or something along those lines! As Roger suggested do check the function logs and you should see the error listed out! We got your back (and thanks Roger for being Awesome!)
@@SonnySangha thanks for the reply I managed to fix it and then came back to try and tell you that I figured it out. Now my next issue is on vercel when running the app it doesn't refresh comment or tweet. If I update the sanity database and then refresh the page it pulls in the new data I put in the sanity database. However I can't comment to tweet or refresh feed on the whistle Running Up. Thanks sonny you are a legend
@@SonnySangha Amazing course, Sonny! I'm also getting the 500 error deploying to Vercel. All the env variables are setup including the NEXTAUTH ones. The Functions realtime longs say [GET] /api/auth/session Function Status 304 when I do it.
well nvm guys 😂😂😂 if anyone got confused there just enable & disbale the block tweet again maybe for the first time you'll not see the "bloclTweet" as it was for me
having a hard time deploying to vercel. I get an internal 500 server error. even when i replace next_auth_url and next_public_base after successful upload. can anyone help me who has experienced the same? i even looked at the reddit build for reference but to no avail.
I have the same issue, maybe we can try fix it together? i have also updated my env variables. i think thats where the issue is, just not sure which combination of urls to use
@@wesatat I fixed this. Once you get that 500 error Take the latest deployment uri and paste it in your twitter oauth 2 along with the callback that’s already provided. Also include the vercel uri beneath the callback by itself.
@@nicholasbazzoni7084 thanks i actually figured this out and was coming back to the comments section to explain the fix! now my issue is when running in vercel the refresh fee and add tweet and add comment function dont seem to work
@@nicholasbazzoni7084 same! If I update the sanity database manually then it does pull through changes but when I click refresh or add comment or add tweet. Then it just constantly refreshes but doesn't seem to get the data. I am really hoping we both can figure this out
If the tweetId is inside the handleSubmit function or used there then check the video description. If that doesn't work then just know that that variable is either not defined at the right place or not defined at all. If the next piece of code is running before tweetId can get it's value then just use an useEffect hook. I can't be 100% since I haven't yet watched this video yet, so I will update my answer once I watch it from start to finish.