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!

КОМЕНТАРІ • 26

  • @sayidali431
    @sayidali431 Рік тому +1

    Thanks Mr Abbas i appreicaite the most waiting project

  • @akhror-oshie
    @akhror-oshie Рік тому

    Thanks, Abbas and keep going!

  • @RifkiJones
    @RifkiJones Рік тому

    Excellent series Abbas. I really appreciate how you explain the code and concepts you're using here. Looking forward to the next one

  • @AfonsoFilipeJr
    @AfonsoFilipeJr Рік тому

    Thanks once more!😊

  • @user-ev6sh9vr5n
    @user-ev6sh9vr5n Рік тому

    thanks you😍

  • @gintarase
    @gintarase Рік тому

    Thanks !!!

  • @user-cf2hv2if4i
    @user-cf2hv2if4i 5 місяців тому

    I'm getting a error cannot read properties of undefined (reading _'id')

  • @neveriodev350
    @neveriodev350 Рік тому

    hello is there no possible way of just adding the new fields to the existing table without deleting it?

  • @dolapoajayi2156
    @dolapoajayi2156 Рік тому

    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.🙏

  • @rakibulinux
    @rakibulinux Рік тому

    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.

  • @bayziduddin6796
    @bayziduddin6796 Рік тому

    Can you show us how to manage state using Zustand in this project?

  • @fathismael
    @fathismael 13 днів тому

    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 ?

    • @codingwithabbas
      @codingwithabbas  11 днів тому

      It seems like your endpoint is not sending any response.

    • @fathismael
      @fathismael 9 днів тому

      @@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

  • @TerryMitchell
    @TerryMitchell Рік тому +1

    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

    • @codingwithabbas
      @codingwithabbas  Рік тому +1

      Check the address value in the controller.

    • @TerryMitchell
      @TerryMitchell Рік тому

      @@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.

    • @akhror-oshie
      @akhror-oshie Рік тому +1

      @@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

    • @TerryMitchell
      @TerryMitchell Рік тому

      @@codingwithabbas Hi Ghulam, I think you missed my other reply to this comment - somebody else has the same problem - thanks.

    • @ecosander8529
      @ecosander8529 Рік тому

      ​@@TerryMitchell await address.deleteOne( )