Skip to content

Conversation

@dashaaaa21
Copy link

No description provided.

Copy link

@sycons sycons left a comment

Choose a reason for hiding this comment

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

Following were implemented:

  • fake-data directory is no longer used ✅
  • App connects to endpoints in the API to fetch data for categories and products ✅
  • Filter the products in the API and not in the frontend ✅
  • App displays loading when waiting for request to complete fetching data ✅
  • App shows an error message if the request failed ✅
  • Clicking on product card goes to a detail page ✅
  • Detail page fetches data from an endpoint ✅
  • Deploy app somewhere (like netlify) and add link to PR ✅

Great job! Added some comments on details I noticed. Your UI is responsive and sleek and you add UX touches that are really nice.

Well done on structuring your app by separating out pages and services.

};

export const fetchProducts = async (category = null) => {
const url = category
Copy link

Choose a reason for hiding this comment

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

Clever implementation to use an optional parameter to determine the URL ⭐

d="M15 19l-7-7 7-7"
/>
</svg>
Back to Products
Copy link

Choose a reason for hiding this comment

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

Nice UX to add this button ⭐


useEffect(() => {
loadProducts();
}, [selectedCategory]);
Copy link

@sycons sycons Dec 28, 2025

Choose a reason for hiding this comment

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

OPTIONAL: Fix linting warning React Hook useEffect has a missing dependency: 'loadProducts'. Either include it or remove the dependency array. You can run npm run lint to see this warning. Fixing this will provide a deeper understanding of the useEffect hook.

@sycons sycons self-assigned this Jan 11, 2026
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.

2 participants