TopOfTableContents.jsx 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { withTranslation } from 'react-i18next';
  4. import PageContainer from '../services/PageContainer';
  5. import { withUnstatedContainers } from './UnstatedUtils';
  6. const TopOfTableContents = (props) => {
  7. return (
  8. <>
  9. {/* TODO GW-3253 add four contents */}
  10. <div className="liker-and-seenusers d-flex align-items-end pb-1">
  11. <button type="button" className="bg-transparent border-0">
  12. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
  13. <defs>
  14. <style>
  15. {'\
  16. .cls-1{\
  17. fill: none;\
  18. }\
  19. '}
  20. </style>
  21. </defs>
  22. <g id="レイヤー_2" data-name="レイヤー 2">
  23. <g id="レイヤー_1-2" data-name="レイヤー 1">
  24. <rect className="cls-1" width="14" height="14" />
  25. <g id="グループ_678" data-name="グループ 678">
  26. <path d="M12.63,2.72H1.37a.54.54,0,0,1,0-1.08H12.63a.54.54,0,0,1,0,1.08Z" />
  27. <path d="M11.82,5.94H1.37a.55.55,0,0,1,0-1.09H11.82a.55.55,0,1,1,0,1.09Z" />
  28. <path d="M9.41,9.15h-8a.54.54,0,0,1,0-1.08h8a.54.54,0,0,1,0,1.08Z" />
  29. <path d="M10.84,12.36H1.37a.54.54,0,1,1,0-1.08h9.47a.54.54,0,1,1,0,1.08Z" />
  30. </g>
  31. </g>
  32. </g>
  33. </svg>
  34. </button>
  35. <button type="button" className="bg-transparent border-0">
  36. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
  37. <defs>
  38. <style>
  39. {'\
  40. .cls-1{\
  41. fill: none;\
  42. }\
  43. '}
  44. </style>
  45. </defs>
  46. <g id="レイヤー_2" data-name="レイヤー 2">
  47. <g id="レイヤー_1-2" data-name="レイヤー 1">
  48. <rect className="cls-1" width="14" height="14" />
  49. <path
  50. id="Icon_material-timeline"
  51. data-name="Icon material-timeline"
  52. d="M13.6,4.6a1.2,1.2,0,0,1-1.2,1.2,1,1,0,0,1-.3,0L10,7.89a1.1,1.1,0,0,1,0,.31,1.2,1.2,0,1,1-2.4,0,1.1,1.1,0,0,1,
  53. 0-.31L6.11,6.36a1.3,1.3,0,0,1-.62,0L2.75,9.1a1,1,0,0,1,0,.3A1.2,1.2,0,1,1,1.6,8.2a1,1,0,0,1,.3,0L4.64,
  54. 5.51a1.1,1.1,0,0,1,0-.31A1.2,1.2,0,0,1,7,5.2a1.1,1.1,0,0,1,0,.31L8.49,7a1.3,1.3,0,0,1,.62,0L11.25,4.9a1,
  55. 1,0,0,1-.05-.3,1.2,1.2,0,1,1,2.4,0Z"
  56. />
  57. </g>
  58. </g>
  59. </svg>
  60. </button>
  61. <button type="button" className="bg-transparent border-0">
  62. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
  63. <defs>
  64. <style>
  65. {'\
  66. .cls-1{\
  67. fill: none;\
  68. }\
  69. '}
  70. </style>
  71. </defs>
  72. <g id="レイヤー_2" data-name="レイヤー 2">
  73. <g id="レイヤー_1-2" data-name="レイヤー 1">
  74. <rect className="cls-1" width="14" height="14" />
  75. <path
  76. d="M7.94.94A6.13,6.13,0,0,0,1.89,7v.1L.67,5.89a.38.38,0,0,0-.55,0,.39.39,0,0,0,0,.56L2.36,8.69,4.6,6.45a.4.4,0,0,0,0-.56.39.39,0,0,0-.56,
  77. 0L2.68,7.25V7A5.33,5.33,0,0,1,7.94,1.73,5.33,5.33,0,0,1,13.21,7a5.34,5.34,0,0,1-5.27,5.27H7.86A5,5,0,0,1,4,10.38a.4.4,0,0,0-.55-.07.4.4,0,
  78. 0,0-.07.56,5.83,5.83,0,0,0,4.52,2.19H8A6.13,6.13,0,0,0,14,7,6.13,6.13,0,0,0,7.94.94Z"
  79. />
  80. <path d="M7.94,2.83a.4.4,0,0,0-.39.4V7.37L10,8.92a.37.37,
  81. 0,0,0,.21.06.4.4,0,0,0,.21-.73L8.34,6.93V3.23A.4.4,0,0,0,7.94,2.83Z"
  82. />
  83. </g>
  84. </g>
  85. </svg>
  86. </button>
  87. <button type="button" className="bg-transparent border-0">
  88. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
  89. <defs>
  90. <style>
  91. {'\
  92. .cls-1{\
  93. fill: none;\
  94. }\
  95. .cls-2{\
  96. isolation: isolate;\
  97. '}
  98. </style>
  99. </defs>
  100. <g id="レイヤー_2" data-name="レイヤー 2">
  101. <g id="レイヤー_1-2" data-name="レイヤー 1">
  102. <rect className="cls-1" width="14" height="14" />
  103. <g id="_" data-name=" " className="cls-2">
  104. <g className="cls-2">
  105. <path d="M2.9,13a2,2,0,0,1-1.44-.63,2.28,2.28,0,0,1,0-3.23l7-7.38a2.48,2.48,0,0,1,1.22-.7,2.61,
  106. 2.61,0,0,1,1.41.09A3.46,3.46,0,0,1,12.37,2a3.94,3.94,0,0,1,.36.45A2.61,2.61,0,0,1,13,3a3.41,3.41,
  107. 0,0,1,.16.57,3.06,3.06,0,0,1-.82,2.75L7.07,11.86a.35.35,0,0,1-.26.13.4.4,0,0,1-.28-.1.47.47,0,0,
  108. 1-.12-.27.39.39,0,0,1,.11-.29l5.26-5.59a2.28,2.28,0,0,0,.65-1.62,2.07,2.07,0,0,0-.62-1.58A2.62,2.62,
  109. 0,0,0,11,1.93a2,2,0,0,0-1-.13,1.63,1.63,0,0,0-1,.5L2,9.67a1.52,1.52,0,0,0,0,2.16,1.28,1.28,0,0,0,
  110. .44.3,1,1,0,0,0,.51.08,1.43,1.43,0,0,0,1-.49L9.49,5.84l.12-.13.11-.15a1.24,1.24,0,0,0,.1-.2,1.94,
  111. 1.94,0,0,0,0-.2.6.6,0,0,0,0-.22.66.66,0,0,0-.14-.2.57.57,0,0,0-.45-.22,1,1,0,0,0-.52.3L4.56,
  112. 9.25a.42.42,0,0,1-.17.1.34.34,0,0,1-.2,0A.4.4,0,0,1,4,9.26.34.34,0,0,1,3.89,9,.41.41,0,0,1,4,8.72L8.16,
  113. 4.28a1.7,1.7,0,0,1,1-.53,1.32,1.32,0,0,1,1.06.43,1.23,1.23,0,0,1,.4,1.05,1.8,1.8,0,0,1-.58,1.14L4.52,
  114. 12.26A2.3,2.3,0,0,1,3,13H2.9Z"
  115. />
  116. </g>
  117. </g>
  118. </g>
  119. </g>
  120. </svg>
  121. </button>
  122. <div
  123. id="liker-list"
  124. data-user-ids-str="{{ page.liker|slice(-15)|default([])|reverse|join(',') }}"
  125. data-sum-of-likers="{{ page.liker.length|default(0) }}"
  126. >
  127. </div>
  128. <div
  129. id="seen-user-list"
  130. data-user-ids-str="{{ page.seenUsers|slice(-15)|default([])|reverse|join(',') }}"
  131. data-sum-of-seen-users="{{ page.seenUsers.length|default(0) }}"
  132. >
  133. </div>
  134. </div>
  135. </>
  136. );
  137. };
  138. /**
  139. * Wrapper component for using unstated
  140. */
  141. const TopOfTableContentsWrapper = withUnstatedContainers(TopOfTableContents, [PageContainer]);
  142. TopOfTableContents.propTypes = {
  143. pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
  144. };
  145. export default withTranslation()(TopOfTableContentsWrapper);