inital product detail page#21
Open
Kylie-Lallak wants to merge 6 commits into
Open
Conversation
brandonw504
requested changes
May 11, 2025
Contributor
brandonw504
left a comment
There was a problem hiding this comment.
This looks great so far, thank you for working around us not having designs! The animations and styles look great. Just a few things:
- Can you generalize the options so that we can have many different kinds? For example, someone can choose both a size and a color. In your mocked data, you can create a JSON object that looks like this:
{ "size": ["Small", "Medium", "Large"], "color": ["Red", "Blue"], ... any number of other options } - Can you also store the options in the ShoppingCartContext? I notice you call add_to_cart but it doesn't accept options yet. Since the cart is saved in local storage, we can add a property to the LocalItem interface that stores options in a similar format to the JSON object above.
- Can you add an optional discount field to product that's in a percentage form (like 10% off) and add some styling for it on the frontend? Maybe cross off the original price and put the discounted price next to it.
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.
No description provided.