DEV Community

Sabrina Boby
Sabrina Boby

Posted on

hhhhh

 <h2>kkkkkk</h2>
Enter fullscreen mode Exit fullscreen mode

Image description

Uploading image

.product-category {
  margin-bottom: 5px;

  a {
    color: #adadad;
    font-size: 12px;
  }
}
Enter fullscreen mode Exit fullscreen mode
  private getWishlistItems() {
    if (this.userService.isUser) {
      this.wishlistService.getWishlistByUser().subscribe({
          next: res => {
            this.wishlists = res.data;
            this.wishlist = this.wishlists.find(f => (f.product as Product)._id === this.product?._id);

            console.log("this.wishlist",this.wishlist)

            if (this.wishlist){
              this.isWishlist=false
            }else {
              this.isWishlist=true
            }
          },
          error: error => {
            console.log(error);
          }
        }
      );
    }
  }
Enter fullscreen mode Exit fullscreen mode
  private getWishlistItems() {
    if (this.userService.isUser) {
      this.wishlistService.getWishlistByUser().subscribe({
          next: res => {
            this.wishlists = res.data;
            this.wishlist = this.wishlists.find(f => (f.product as Product)._id === this.product?._id);

            console.log("this.wishlist",this.wishlist)

            if (this.wishlist){
              this.isWishlist=false
            }else {
              this.isWishlist=true
            }
          },
          error: error => {
            console.log(error);
          }
        }
      );
    }
  }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)