Open
Conversation
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.11 to 5.4.6. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
robvk
reviewed
Jan 15, 2026
robvk
left a comment
There was a problem hiding this comment.
Good code, some small issues and one big issue:
- Again you have code in here that is not supposed to be here. Once you are ready with the project, come back and fix this because otherwise you will get into issues when working with others.
| function App() { | ||
| return ( | ||
| <FavouritesProvider> | ||
| <header className="navbar"> |
There was a problem hiding this comment.
Maybe nicer to have this as a
component?| const { id, title, image, price } = product; | ||
| const { favourites, toggleFavourite } = useFavourites(); | ||
|
|
||
| const isFavourite = favourites.includes(id); |
There was a problem hiding this comment.
I think this function can also be defined in the useFavourites hook. Then you keep all the functions around the favourites array in the same place
| className="fav-button" | ||
| onClick={() => toggleFavourite(id)} | ||
| > | ||
| {isFavourite ? "❤️" : "♡"} |
There was a problem hiding this comment.
This is risky, different Operating systems/browsers render it differently and some even can't render it. Best to use an .svg and then render that to be consistent.
| export function useFavourites() { | ||
| const ctx = useContext(FavouritesContext); | ||
| if (!ctx) { | ||
| throw new Error("useFavourites must be used inside FavouritesProvider"); |
There was a problem hiding this comment.
Good stuff, helps a lot with debugging if you make a mistake!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
version Netlify : https://cozy-begonia-81d501.netlify.app/