TopOfTableContents.jsx 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. .cls-1{{ fill: 'none' }}
  16. </style>
  17. </defs>
  18. <g id="レイヤー_2" data-name="レイヤー 2">
  19. <g id="レイヤー_1-2" data-name="レイヤー 1">
  20. <rect className="cls-1" width="14" height="14" />
  21. <g id="グループ_678" data-name="グループ 678">
  22. <path d="M12.63,2.72H1.37a.54.54,0,0,1,0-1.08H12.63a.54.54,0,0,1,0,1.08Z" />
  23. <path d="M11.82,5.94H1.37a.55.55,0,0,1,0-1.09H11.82a.55.55,0,1,1,0,1.09Z" />
  24. <path d="M9.41,9.15h-8a.54.54,0,0,1,0-1.08h8a.54.54,0,0,1,0,1.08Z" />
  25. <path d="M10.84,12.36H1.37a.54.54,0,1,1,0-1.08h9.47a.54.54,0,1,1,0,1.08Z" />
  26. </g>
  27. </g>
  28. </g>
  29. </svg>
  30. </button>
  31. <button type="button" className="bg-transparent border-0">
  32. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
  33. <defs>
  34. <style>
  35. .cls-1{{ fill: 'none' }}
  36. </style>
  37. </defs>
  38. <g id="レイヤー_2" data-name="レイヤー 2">
  39. <g id="レイヤー_1-2" data-name="レイヤー 1">
  40. <rect className="cls-1" width="14" height="14" />
  41. <path
  42. id="Icon_material-timeline"
  43. data-name="Icon material-timeline"
  44. 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,
  45. 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,
  46. 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,
  47. 1,0,0,1-.05-.3,1.2,1.2,0,1,1,2.4,0Z"
  48. />
  49. </g>
  50. </g>
  51. </svg>
  52. </button>
  53. <button type="button" className="bg-transparent border-0">
  54. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
  55. <defs>
  56. <style>
  57. .cls-1{{ fill: 'none' }}
  58. </style>
  59. </defs>
  60. <g id="レイヤー_2" data-name="レイヤー 2">
  61. <g id="レイヤー_1-2" data-name="レイヤー 1">
  62. <rect className="cls-1" width="14" height="14" />
  63. <path
  64. id="Icon_material-timeline"
  65. data-name="Icon material-timeline"
  66. 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,
  67. 1,1-2.4,0,1.1,1.1,0,0,1,0-.31L6.11,6.36a1.3,1.3,0,0,1-.62,0L2.75,9.1a1,1,0,0,1,0,.3A1.2,
  68. 1.2,0,1,1,1.6,8.2a1,1,0,0,1,.3,0L4.64,5.51a1.1,1.1,0,0,1,0-.31A1.2,1.2,0,0,1,7,5.2a1.1,
  69. 1.1,0,0,1,0,.31L8.49,7a1.3,1.3,0,0,1,.62,0L11.25,4.9a1,1,0,0,1-.05-.3,1.2,1.2,0,1,1,2.4,0Z"
  70. />
  71. </g>
  72. </g>
  73. </svg>
  74. </button>
  75. <button type="button" className="bg-transparent border-0">
  76. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
  77. <defs>
  78. <style>
  79. .cls-1{{ fill: 'none' }}
  80. .cls-2{{ isolation: 'isolate' }}
  81. </style>
  82. </defs>
  83. <g id="レイヤー_2" data-name="レイヤー 2">
  84. <g id="レイヤー_1-2" data-name="レイヤー 1">
  85. <rect className="cls-1" width="14" height="14" />
  86. <g id="_" data-name=" " className="cls-2">
  87. <g className="cls-2">
  88. <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,
  89. 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,
  90. 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,
  91. 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,
  92. 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,
  93. .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,
  94. 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,
  95. 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,
  96. 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,
  97. 12.26A2.3,2.3,0,0,1,3,13H2.9Z"
  98. />
  99. </g>
  100. </g>
  101. </g>
  102. </g>
  103. </svg>
  104. </button>
  105. <div
  106. id="liker-list"
  107. data-user-ids-str="{{ page.liker|slice(-15)|default([])|reverse|join(',') }}"
  108. data-sum-of-likers="{{ page.liker.length|default(0) }}"
  109. >
  110. </div>
  111. <div
  112. id="seen-user-list"
  113. data-user-ids-str="{{ page.seenUsers|slice(-15)|default([])|reverse|join(',') }}"
  114. data-sum-of-seen-users="{{ page.seenUsers.length|default(0) }}"
  115. >
  116. </div>
  117. </div>
  118. </>
  119. );
  120. };
  121. /**
  122. * Wrapper component for using unstated
  123. */
  124. const TopOfTableContentsWrapper = withUnstatedContainers(TopOfTableContents, [PageContainer]);
  125. TopOfTableContents.propTypes = {
  126. pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
  127. };
  128. export default withTranslation()(TopOfTableContentsWrapper);