Browse Source

fix copied files

yusuketk 5 years ago
parent
commit
0b400317e1

+ 2 - 4
src/client/js/components/User/LikerList.jsx

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
 
 import UserPictureList from './UserPictureList';
 
-import { createSubscribedElement } from '../UnstatedUtils';
+import { withUnstatedContainers } from '../UnstatedUtils';
 
 import PageContainer from '../../services/PageContainer';
 
@@ -32,8 +32,6 @@ LikerList.propTypes = {
 /**
  * Wrapper component for using unstated
  */
-const LikerPictureListWrapper = (props) => {
-  return createSubscribedElement(LikerList, props, [PageContainer]);
-};
+const LikerPictureListWrapper = withUnstatedContainers(LikerList, [PageContainer]);
 
 export default (LikerPictureListWrapper);

+ 0 - 30
src/client/js/components/User/LikerPictureList.jsx

@@ -1,30 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-
-import UserPictureList from './UserPictureList';
-
-import { withUnstatedContainers } from '../UnstatedUtils';
-
-import PageContainer from '../../services/PageContainer';
-
-class LikerPictureList extends React.Component {
-
-  render() {
-    const { pageContainer } = this.props;
-    return (
-      <UserPictureList users={pageContainer.state.likerUsers} />
-    );
-  }
-
-}
-
-LikerPictureList.propTypes = {
-  pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
-};
-
-/**
- * Wrapper component for using unstated
- */
-const LikerPictureListWrapper = withUnstatedContainers(LikerPictureList, [PageContainer]);
-
-export default (LikerPictureListWrapper);

+ 2 - 4
src/client/js/components/User/SeenUserList.jsx

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
 
 import UserPictureList from './UserPictureList';
 
-import { createSubscribedElement } from '../UnstatedUtils';
+import { withUnstatedContainers } from '../UnstatedUtils';
 
 import PageContainer from '../../services/PageContainer';
 
@@ -32,8 +32,6 @@ SeenUserList.propTypes = {
 /**
  * Wrapper component for using unstated
  */
-const SeenUserPictureListWrapper = (props) => {
-  return createSubscribedElement(SeenUserList, props, [PageContainer]);
-};
+const SeenUserPictureListWrapper = withUnstatedContainers(SeenUserList, [PageContainer]);
 
 export default (SeenUserPictureListWrapper);

+ 0 - 30
src/client/js/components/User/SeenUserPictureList.jsx

@@ -1,30 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-
-import UserPictureList from './UserPictureList';
-
-import { withUnstatedContainers } from '../UnstatedUtils';
-
-import PageContainer from '../../services/PageContainer';
-
-class SeenUserPictureList extends React.Component {
-
-  render() {
-    const { pageContainer } = this.props;
-    return (
-      <UserPictureList users={pageContainer.state.seenUsers} />
-    );
-  }
-
-}
-
-SeenUserPictureList.propTypes = {
-  pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
-};
-
-/**
- * Wrapper component for using unstated
- */
-const SeenUserPictureListWrapper = withUnstatedContainers(SeenUserPictureList, [PageContainer]);
-
-export default (SeenUserPictureListWrapper);