Skip to content

Konjit-w3-React #29

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 4 commits into
base: main
Choose a base branch
from
Open

Conversation

konjit
Copy link

@konjit konjit commented Apr 30, 2025

  • Added option for users to add products to their favorites.
  • Displays a visual cue showing how many products are in the user's favorites.
  • Includes a link to view favorite products.

@konjit
Copy link
Author

konjit commented Apr 30, 2025

And the link to the deployed app: https://hyf-ecommerce-w3.netlify.app/

@tkitson tkitson self-assigned this May 15, 2025
Copy link

@tkitson tkitson left a comment

Choose a reason for hiding this comment

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

Well done @konjit - app looks great and works as it should! Just a couple of small tweaks I have suggested - but nothing that is preventing the app from already working really well.


useEffect(() => {
if (url) fetchData();
}, [fetchData]);
Copy link

Choose a reason for hiding this comment

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

You need to add 'url' as a dependency here as well, as the fetchData function also relies on it (see line 31)


return (

<FavoritesProvider>
Copy link

Choose a reason for hiding this comment

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

Check the indentation here :)


useEffect(() => {
setUrl(productsUrl);
}, [productsUrl]);
Copy link

Choose a reason for hiding this comment

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

Check the dependency array warning here too

Copy link
Author

Choose a reason for hiding this comment

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

Hi @tkitson. Thank you for taking the time to check the code.

@konjit konjit requested a review from tkitson May 16, 2025 17:11
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