AllenYuan

Untitled

May 26th, 2020
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. import React from 'react';
  2. import FlatButton from 'material-ui/FlatButton';
  3. import { connect } from 'react-redux';
  4. import PropTypes from 'prop-types';
  5. import styled from 'styled-components';
  6. import { ButtonsDiv } from './Styled';
  7.  
  8. // sponsors style
  9. const StyledDiv = styled.div`
  10. display: flex;
  11. flex-direction: column;
  12. align-items: center;
  13. margin-top: 30px;
  14. margin-bottom: 20px;
  15. text-align: center;
  16.  
  17. & .headline {
  18. text-transform: uppercase;
  19. margin-bottom: 20px;
  20. font-size: 20px;
  21. }
  22.  
  23. & img {
  24. height: 32px;
  25. margin: 10px 15px;
  26. transition: var(--normalTransition);
  27. }
  28.  
  29. & a {
  30. background-color: transparent !important;
  31. padding: 0 !important;
  32. border-width: 1px !important;
  33. border-radius: 0 !important;
  34. }
  35. `;
  36.  
  37. // display sponsor links
  38. const Sponsors = ({ strings }) => {
  39.  
  40. return (<StyledDiv>
  41. <div className="headline">{strings.home_sponsored_by}</div>
  42. <div className="images">
  43. <a
  44. href="http://www.vpgame.com/"
  45. target="_blank"
  46. rel="noopener noreferrer"
  47. >
  48. <img src="/assets/images/vp-logo.png" alt="" />
  49. </a>
  50. <a
  51. href="https://www.openai.com"
  52. target="_blank"
  53. rel="noopener noreferrer"
  54. >
  55. <img src="/assets/images/openai-logo.png" alt="" />
  56. </a>
  57. <a
  58. href="https://www.rivalry.com/opendota"
  59. target="_blank"
  60. rel="noopener noreferrer"
  61. >
  62. <img src="/assets/images/rivalry-logo.png" alt="" />
  63. </a>
  64. <a
  65. href="https://gosu.ai/dota/?utm_source=opendota&utm_medium=cpc&utm_campaign=Home"
  66. target="_blank"
  67. rel="noopener noreferrer"
  68. >
  69. <img src="/assets/images/gosu-logo.png" alt="" />
  70. </a>
  71. </div>
  72. <ButtonsDiv>
  73. <FlatButton
  74. label={
  75. <span style={{ fontWeight: 300 }}>{strings.home_become_sponsor}</span>
  76. }
  77. href="//carry.opendota.com"
  78. />
  79. </ButtonsDiv>
  80. </StyledDiv>);
  81. };
  82.  
  83. Sponsors.propTypes = {
  84. strings: PropTypes.shape({}),
  85. };
  86.  
  87. const mapStateToProps = state => ({
  88. strings: state.app.strings,
  89. });
  90.  
  91. export default connect(mapStateToProps)(Sponsors);
Add Comment
Please, Sign In to add comment