This PR introduces a dedicated page on the dashboard for users to modify their existing listing details. Users can update various attributes of their listings, including the name, price, description, category, and images. This page enhances the user experience by offering a straightforward interface for managing listings.
Changes Made:
User Interface:
Added a user-friendly form to the dashboard for modifying listing details.
Included fields for modifying name, price, description, category, and images.
Implemented an image upload component allowing users to add or remove images.
Functionality:
Fetches the current listing details from the database on page load.
Provides form validation to ensure all fields are filled before submission.
Displays success or error messages after submitting the form based on the operation result.
Routing and Navigation:
Added routing for the new page accessible from the dashboard.
Added a button to navigate back to the listings overview page after modifications.
Backend Integration:
Updated the updateListing server actions to accomodate some necessary changes needed. Images were duplicating on updating.
Ensured that only authenticated users can modify their listings.
Overview
This PR introduces a dedicated page on the dashboard for users to modify their existing listing details. Users can update various attributes of their listings, including the name, price, description, category, and images. This page enhances the user experience by offering a straightforward interface for managing listings.
Changes Made:
User Interface:
Functionality:
Routing and Navigation:
Backend Integration:
Screenshots
https://github.com/user-attachments/assets/1c9073ab-ffd9-4d28-b85f-0619b7879bb0
closes #440