Skip to content

Feature/add favorite button#3

Open
liserezvee wants to merge 3 commits intomainfrom
feature/add-favorite-button
Open

Feature/add favorite button#3
liserezvee wants to merge 3 commits intomainfrom
feature/add-favorite-button

Conversation

@liserezvee
Copy link
Collaborator

  • added favorite button for the favorite cart

@liserezvee liserezvee added the enhancement New feature or request label Jul 15, 2021
@liserezvee liserezvee requested a review from foysalit July 15, 2021 14:01
@liserezvee liserezvee self-assigned this Jul 15, 2021
onClick={(e) => {
e.preventDefault();
onAddToCartClick(product);
onAddToCartClick(product);
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a bit weird 1 space extra indentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry i didn't notice those error..

setClick(!click);
}}
>
{!!click ? "Remove Favorite❌" : "Add favorite 👍🏼"}
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

cartItems: `name, price, description, image, count`,
});

db.version(2).stores({
Copy link
Contributor

Choose a reason for hiding this comment

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

why create a different db for this, you could just add favoriteItems store in the previous definition along with cartItems, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought i need another db for this favorite item list . So i used this one.

@@ -0,0 +1,60 @@
import { useState, useEffect } from "react";
Copy link
Contributor

Choose a reason for hiding this comment

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

not bad but this is pretty much a copy of everything I wrote which is why you have a bunch of code that doesn't quite apply to favorite list. can you identify those lines?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually i didn't understand how to implement those things so copied your cart item theme and tried to work on this . And i removed lots of cart item codes but as you said there are still available i'll check those codes and try to solve ..
Thanks

@parizat-hridi parizat-hridi requested a review from foysalit July 16, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants