NexGenStudioDev/ciitm-frontend

🐛 Feature Request: Delete Testimonial Functionality via Recycle Bin Icon

オヌプン

#221 opened on 2025/09/08

 (12 件のコメント) (0 件のリアクション) (0 人の担圓者)JavaScript (39 件のフォヌク)auto 404
Ciitm FrontendONLY_FOR_NEW_CONTRIBUTORSReactResponsiveUi Updateatomic-designbest-practicesenhancementfeature-requestgood first issuehacktoberfestonlydust-wave

Repository metrics

Stars
 (9 個のスタヌ)
PR merge metrics
 (PR metrics pending)

説明

When a user logs in and navigates to the Home page, there is a Testimonial section that displays a list of Testimonial Cards. Each card includes a Recycle Bin icon (🗑) that should allow the Admin to delete that specific testimonial.

Currently, clicking the Recycle Bin icon does nothing.

✅ Expected Functionality

When a user clicks the Recycle Bin icon on a Testimonial card:

  • The testimonial should be removed from the Redux state (testimonialSlice).
  • A DELETE request should be sent to the backend API endpoint.

DELETE /api/v1/deleteTestimonial/:id

✅ Expected Functionality

When a user clicks the Recycle Bin icon on a Testimonial card:

  • The testimonial should be removed from the Redux state (testimonialSlice).
  • A DELETE request should be sent to the backend API endpoint:
    /api/v1/deleteTestimonial/:id (DELETE),
    where :id is the ID of the testimonial being deleted.

⚙ Tech Stack

  • Frontend: React
  • State Management: Redux Toolkit
  • API Endpoint: /api/v1/deleteTestimonial/:id (DELETE)

🛠 To-Do

  • Add onClick logic to Recycle Bin icon
  • Create and connect deleteTestimonial thunk
  • Update Redux store on delete
  • Handle errors gracefully
  • (Optional) Add confirmation dialog before deletion
  • (Optional) Show toast/alert after deletion

Discord Server

コントリビュヌタヌガむド