yusuketk 5 лет назад
Родитель
Сommit
5a00458cb7

+ 2 - 4
src/client/js/components/User/LikerPictureList.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';
 
@@ -25,8 +25,6 @@ LikerPictureList.propTypes = {
 /**
  * Wrapper component for using unstated
  */
-const LikerPictureListWrapper = (props) => {
-  return createSubscribedElement(LikerPictureList, props, [PageContainer]);
-};
+const LikerPictureListWrapper = withUnstatedContainers(LikerPictureList, [PageContainer]);
 
 export default (LikerPictureListWrapper);

+ 2 - 4
src/client/js/components/User/SeenUserPictureList.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';
 
@@ -25,8 +25,6 @@ SeenUserPictureList.propTypes = {
 /**
  * Wrapper component for using unstated
  */
-const SeenUserPictureListWrapper = (props) => {
-  return createSubscribedElement(SeenUserPictureList, props, [PageContainer]);
-};
+const SeenUserPictureListWrapper = withUnstatedContainers(SeenUserPictureList, [PageContainer]);
 
 export default (SeenUserPictureListWrapper);