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] <[email protected]> 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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JalalHabeeb
left a comment
There was a problem hiding this comment.
Nice work, I added a few comments
| getCategories(); | ||
| }, []); | ||
|
|
||
| let isClicked = false; |
There was a problem hiding this comment.
isClicked is assigned a value, but you never use it. The following instances are just re-assignments without actual usage of the variable.
There was a problem hiding this comment.
Thanks for pointing that. This variable is actually required in the next function and removing it will cause an error "varaible not defined". I know that I am mixing between React's way and JavaScript way, but I needed this variable declaration to ensure it is defined.
There was a problem hiding this comment.
Remove the variable and check. The code will work as it is. Plus, isClicked is never declared
There was a problem hiding this comment.
Done it.
That is true. I just wanted to reverse the click. So when you press the category button again, all products of all categories will be visible again.
| <div class="max-w-screen-xl px-4 mx-auto 2xl:px-0"> | ||
| <div class="lg:grid lg:grid-cols-2 lg:gap-8 xl:gap-16"> | ||
| <div class="shrink-0 max-w-md lg:max-w-lg mx-auto"> | ||
| <img class="w-full dark:hidden" src={product.image} alt="" /> |


No description provided.