Next.js 13 Full Stack E-commerce App #16 | Update & Delete Address, Current User Addresses
Вставка
- Опубліковано 30 бер 2023
- Git Repo Link:
github.com/ghulamabbas2/buyit...
Checkout my In-Depth Next.js Masterclass on Udemy Courses:
www.udemy.com/course/nextjs-b...
Next.js 13 Authentication with Next-Auth:
• Next.js Authentication...
================================================================
⚙️ Gadgets I use for Recording:
💻 Laptop - Macbook PRO M1 - 16/512
amzn.to/4eUqrSe
🎤 MIC - Samson Technologies Q2U USB/XLR Dynamic Microphone
amzn.to/3W9Z4wl
🖱️Mouse - Logitech G402 Gaming Mouse Hyperion Fury USB, Black
amzn.to/3RY4xUy
⌨️ Keyboard - Logitech K380 Multi-Device Bluetooth Keyboard
amzn.to/3RY4Fn0
🖥️ Monitor - UltraSharp 24-Inch Screen Led-Lit Monitor (U2419H)
amzn.to/4bxidN6
================================================================
In this video, we continue to build our full-stack e-commerce application using Next.js 13. We focus on adding the functionality to update and delete user addresses.
First, we walk through the steps to update an existing address in our database. We demonstrate how to create a form that pre-populates with the existing address information and allows users to make changes. We then show how to update the address in our database using API routes.
Next, we move on to deleting user addresses. We explain how to create a button that allows users to delete an address and walk through the steps to remove the address from our database using API routes.
Throughout the video, we provide clear explanations and demonstrations of the code, making it easy for viewers to follow along and implement these features in their own projects.
If you're interested in building a full-stack e-commerce application with Next.js, or if you're looking to improve your coding skills, this video is a must-watch. Join us as we take another step toward creating a fully functional e-commerce platform!
Thanks for watching, and let's get started!
Thanks Mr Abbas i appreicaite the most waiting project
Thanks, Abbas and keep going!
Excellent series Abbas. I really appreciate how you explain the code and concepts you're using here. Looking forward to the next one
Glad you like them!
Thanks once more!😊
Always welcome
thanks you😍
Thanks !!!
You're welcome!
I'm getting a error cannot read properties of undefined (reading _'id')
hello is there no possible way of just adding the new fields to the existing table without deleting it?
Thank you once more.can this be released asap as I am following you and currently the pace is slow.would appreciate if you could release the course on udemy completely right now and you can keep doing the 2 videos weekly.🙏
I will try my best to upload soon.
Brother is it possible to upload some videos where you will use the Next Js 13 app version basic with typescript. I see on youtube here are no videos. Please upload it so we can learn.
Can you show us how to manage state using Zustand in this project?
hello abbas, i'm getting this error from console when i try to logging "API resolved without sending a response for /api/address, this may result in stalled requests." what does it mean ?
It seems like your endpoint is not sending any response.
@@codingwithabbas So I couldn't add any new address for the current user. I have been searching for the reason and it's seems like the getSession({ req}) method is returning null in POST method. In GET METHOD eeverything is ok BUT with POST METHOD, the session value is null. I tried other methods like getServerSession or anything else but since now i didn't find the solution
Hi Ghulam! Another great section! However, the code is throwing an error for me - I've compared it carefully with yours from the link above.
I'm getting both of the following from toast:
'address.remove is not a function'
AND
'Address successfully updated'
But the address isn't being deleted.
Do you have any idea why this might be/where I should be looking?
Thanks again for your time and effort.
Terry
Check the address value in the controller.
@@codingwithabbas Hi Ghulam, I replied to you twice now but it keeps being removed - it appears they won't let me post code/error messages with JSON on here - it's logging the address value correctly in the terminal fine, so I really don't understand why this is happening.
@@codingwithabbas, I have the same issue, I checked all codes, and everything is the same but when clicking the delete button, the update and delete toast work at the same time and delete is the rendering address.remove is not function, update button works normal
@@codingwithabbas Hi Ghulam, I think you missed my other reply to this comment - somebody else has the same problem - thanks.
@@TerryMitchell await address.deleteOne( )