dvjsharma / Drawn2Shoe

Drawn2Shoe is a user-friendly e-commerce platform. It offers customers the ability to purchase and personalize their shoes. The platform's intuitive interface ensures seamless navigation and usability across a variety of devices.
MIT License
27 stars 42 forks source link

feat: Implemented User Profile Page issue: #143 #150

Closed kaali001 closed 3 months ago

kaali001 commented 3 months ago

Description

This PR introduces several new features and components to the User Profile page, enhancing the user experience and functionality. The following key features have been implemented:

Changes

1. User Profile Page Layout

2. Account Details Component

3. Wishlist Component

4. Purchased Items Component

5. Payment Methods Component

image

6. Address Component

7. Prisma Schema Updates

        model Wishlist {
            id               Int      @id @default(autoincrement())
           userId         String
           productId   Int
           product      Product  @relation(fields: [productId], references: [productId])
          user             Mainuser @relation(fields: [userId], references: [email])
           @@unique([userId, productId])
         }

8. Wishlist Controller

9. PrivateRoute Component

Bug Fixes

  1. Addressed issues related to adding/removing items from the wishlist.
  2. Improved state management to ensure the correct display of wishlist items.
  3. Added a border to navbar.
  4. Added a profile image on navbar at place of user name after login.
  5. Added a dropdown on the profile avatar of user profile page and logout.
  6. Implemented a privateroute component for preventing user to visit profile page , cart page without login.

Before:

After: image image

How to test

1. Setup:

2. Accessing User Profile Page:

3. Testing Wishlist Functionality:

4. Testing PrivateRoute:

It fixes the issue #143 .

dvjsharma commented 3 months ago

Approving the changes, would be good if you work on the others features as well post GSSoC :)

kaali001 commented 3 months ago

Hey @dvjsharma , add the labels on this issue.