You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
711 B

  1. /* eslint react/prop-types: 0 */
  2. import React from "react";
  3. import i18n from "../../i18n";
  4. const Helloasso = props => {
  5. const locale =
  6. i18n.language.substring(0, 2).toLowerCase() === "fr" ? "fr" : "en";
  7. const linkHelloAssoBanner =
  8. locale === "fr"
  9. ? "https://www.helloasso.com/associations/mieux-voter/formulaires/1/widget"
  10. : "https://www.helloasso.com/associations/mieux-voter/formulaires/1/widget/en";
  11. return (
  12. <a href={linkHelloAssoBanner} target="_blank" rel="noopener noreferrer">
  13. <img
  14. src={"/banner/" + locale + "/helloasso.png"}
  15. alt="support us on helloasso"
  16. style={{ width: props.width }}
  17. />
  18. </a>
  19. );
  20. };
  21. export default Helloasso;