Skip to content

[Finishes #187788610] create buyers page on the admin-dashboard #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hatfelicien
Copy link
Collaborator

Purpose

Implement a Buyers Page on the admin dashboard that fetches and displays a list of buyers with their details.
pull request

Changes Made

  • Created the BuyersPage component to fetch and display buyer data.
  • Implemented search functionality to filter buyers by name.
  • Added edit and delete icons for future implementation of respective functionalities.
  • Utilized local storage to retrieve the authentication token for API requests.

Testing Instructions

  1. Ensure you have the authentication token stored in local storage.
  2. Navigate to the Buyers Page on the admin dashboard.
  3. Verify that the list of buyers is fetched and displayed correctly.
  4. Use the search input to filter buyers by their first and last names.

Related Issues

Lists all related issues

Checklist

Please review the following checklist and make sure all tasks are complete before submitting:

  • Code follows the project's coding standards
  • Changes are covered by tests
  • Documentation is updated (if applicable)
  • All tests pass

Copy link

netlify bot commented Jul 19, 2024

Deploy Preview for e-commerce-mavericks-fn ready!

Name Link
🔨 Latest commit c90bb7d
🔍 Latest deploy log https://app.netlify.com/sites/e-commerce-mavericks-fn/deploys/669a04cd13e1390008b8420c
😎 Deploy Preview https://deploy-preview-42--e-commerce-mavericks-fn.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@patrickhag patrickhag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

const fetchBuyers = async () => {
try {
const response = await fetch(
'https://e-commerce-mavericcks-bn-staging-istf.onrender.com/api/users/role/buyer',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't you use RTK query here?
Use it please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants