100% Quality Private Proxies » TOP Anonymous + Buy Proxy Cheap Price!100% Quality Private Proxies » TOP Anonymous + Buy Proxy Cheap Price!100% Quality Private Proxies » TOP Anonymous + Buy Proxy Cheap Price!100% Quality Private Proxies » TOP Anonymous + Buy Proxy Cheap Price!
    0
  •   was successfully added to your cart.
  • Buy Proxies
  • Features
  • Info
  • Contacts
  • Blog
  • Account

For The Same Price! 2x MORE PROXIES $750 Private Proxies 5,000 2,500 Private Proxies 50 100 250 500 1,000 100 200 500 1,000 2,000 Private Proxies Private Proxies Private Proxies Private Proxies $30 $50 $100 $180 $340 BUY! BUY! BUY! BUY! BUY! BUY!

I create a web site of pictures, utilizing React. The information of every picture obtained from Firebase.

When the person clicks on a sure minimized picture – loaded a brand new part named ZoomCardItem, that accommodates particulars in regards to the picture (obtained from the dad or mum) and shows a bigger view of the picture. Then, the person can click on “Like” or “Dislike” and the variety of every one updates in Firebase.

Presently, Like & Dislike are baby elements of ZoomCardItem part. Mainly each of them do the identical factor, aside from writing to totally different paths in Firebase or studying totally different objects from the dad or mum.

I want to keep away from this duplicate code and create one generic part as an alternative, however I failed to take action by myself.
Might anybody assist me to enhance this?

export const ZoomCardItem = (props) => {
  const card = props.card;    
  return (
       <div className="zoom-container">
        <ZoomImage card={card} />
        <div id="detailsContainer" className="details-container">
          <p id="title" className="title">
            {card.title}
          </p>
          <hr />
          <p id="description">{card.description}</p>
          <p id="date" className="date">
            – {card.date}
          </p>
          <ul>{tagsList}</ul>
          <div className="likes-container">
            <Like card={card} />
            <Dislike card={card} />
          </div>
        </div>
      </div>
  );
};


perform Like(props) {
  let card = props.card;

  const [likeClassName, setLikeClassName] = useState(false);
  const [likeCounter, setLikeCounter] = useState(perform () {
    return parseInt(props.card.likes, 10);
  });

  useEffect(() => {
    setLikeCounter(parseInt(props.card.likes, 10));
  }, [props.card.likes]);

  useEffect(() => {
    setLikeCounter(parseInt(props.card.likes, 10));
  }, [props]);

  perform updateLikeDB() {
    var updates = {};
    updates["/Cards/" + card.id + "/likes"] = likeCounter + 1;
    firebase
      .database()
      .ref()
      .replace(updates, perform (error) {
        if (error) {
          return false;
        } else {
          // Information saved efficiently, replace the view of the likes counter
          setLikeClassName(!likeClassName);
          setLikeCounter(likeCounter + 1);
          return true;
        }
      });
  }

  return (
    <div className="like-container">
      <i
        className={
          likeClassName
            ? "fa fa-heart like-icon like-icon-anim"
            : "fa fa-heart like-icon "
        }
        onClick={updateLikeDB}
        onAnimationEnd={() => setLikeClassName(!likeClassName)}
      />
      <p id="likes">{likeCounter}</p>
    </div>
  );
}

perform Dislike(props) {
  let card = props.card;

  const [dislikeClassName, setDislikeClassName] = useState(false);
  const [dislikeCounter, setDislikeCounter] = useState(perform () {
    return parseInt(props.card.likes, 10);
  });

  useEffect(() => {
    setDislikeCounter(parseInt(props.card.dislikes, 10));
  }, [props.card.dislikes]);

  useEffect(() => {
    setDislikeCounter(parseInt(props.card.dislikes, 10));
  }, [props]);

  perform updateDislikeDB() {
    var updates = {};
    updates["/Cards/" + card.id + "/dislikes"] = dislikeCounter + 1;
    firebase
      .database()
      .ref()
      .replace(updates, perform (error) {
        if (error) {
          return false;
        } else {
          // Information saved efficiently, replace the view of the dislikes counter
          setDislikeClassName(!dislikeClassName);
          setDislikeCounter(dislikeCounter + 1);
          return true;
        }
      });
  }

  return (
    <div className="dislike-container">
      <i
        className={
          dislikeClassName
            ? "fas fa-heart-broken dislike-icon dislike-icon-anim"
            : "fas fa-heart-broken dislike-icon"
        }
        onClick={updateDislikeDB}
        onAnimationEnd={() => setDislikeClassName(!dislikeClassName)}
      />
      <p id="dislikes" className="dislikes">
        {dislikeCounter}
      </p>
    </div>
  );
}

Best Quality Private Proxies by Proxyti:

fully anonymous

100% anonymous and safe reliable private proxies

1,000 mb/s speed

Blazing fast proxy servers with up to 1,000 mb/s speed

Elite quality

Best quality proxies from world and USA locations

Unlimited bandwidth

No limits of using your proxies - truly unlimited bandwidth

Buy Now - Get 2X More Proxies:

100 Private Proxies

$30/month

$0.3 Per Proxy
Private and Anonymous
Ultra Fast Speed
Unlimited Bandwidth
USA or Worldwide
2X More Proxies!
Buy now!

200 Private Proxies

$50/month

$0.25 Per Proxy
Private and Anonymous
Ultra Fast Speed
Unlimited Bandwidth
USA or Worldwide
2X More Proxies!
Buy now!

500 Private Proxies

$100/month

$0.2 Per Proxy
Private and Anonymous
Ultra Fast Speed
Unlimited Bandwidth
USA or Worldwide
2X More Proxies!
Buy now!

1,000 Private Proxies

$180/month

$0.18 Per Proxy
Private and Anonymous
Ultra Fast Speed
Unlimited Bandwidth
USA or Worldwide
2X More Proxies!
Buy now!

2,000 Private Proxies

$340/month

$0.17 Per Proxy
Private and Anonymous
Ultra Fast Speed
Unlimited Bandwidth
USA or Worldwide
2X More Proxies!
Buy now!

5,000 Private Proxies

$750/month

$0.15 Per Proxy
Private and Anonymous
Ultra Fast Speed
Unlimited Bandwidth
USA or Worldwide
2X More Proxies!
Buy now!

Our Unbeatable Proxy Features:

Anonymous Proxies

100% security with our proxies – anonymous and secure proxy experience

Ultra Fast Speed

Proxyti offers up to 1,000 mb/s ultra fast proxy speed – feel the real power!

Unlimited Bandwidth

No data limits for your proxies – truly unlimited proxy bandwidth for you!

Proxy Authentication

We secure proxies with IP authentication – use your proxies with your own IP

Elite Quality

Highest proxy quality guarantee with supported HTTP/HTTPS and SOCKS connections

Great Prices

Proxyti offers great proxies for great prices – this is what we call new proxy era!

USA Locations

You can choose USA or random proxies locations when ordering for free

No Limitations

We don’t have any limits – you can use your proxies with every software or program!

Lots Of Subnets

The more proxies you buy, the more subnets you get – it is worth ordering more!

Semi Dedicated

Our proxies are shared with maximum of 5 users at a time, but they are still anonymous

Fast Delivery

We deliver your ordered proxies in your email in .txt file – this is simple as that

Awesome Support

Have any questions or want more information – please contact us anytime!


About Proxyti

We deliver quality private proxy solutions for everyone – fast, anonymous, secure and unlimited proxies by Proxyti.
 

Secure Payments

All payments are made via Paypal – safe and secure payment system administrator

Top rated products

  • 200 Private Proxies
    Rated 4.83 out of 5
    $50.00 / month
  • 1000 Private Proxies
    Rated 4.82 out of 5
    $180.00 / month

Connect with us

Copyright Proxyti.com | All Rights Reserved
  • Buy Proxies
  • Features
  • Info
  • Contacts
  • Blog
  • Account
100% Quality Private Proxies » TOP Anonymous + Buy Proxy Cheap Price!
    0 items