From f81b82b4714643ba396b69ca54b97259a36a6b9f Mon Sep 17 00:00:00 2001
From: taehoon
Date: Wed, 13 Feb 2019 22:52:57 -0500
Subject: Use hoc definitions to be factor of factory
---
src/hocs/with_load_more/with_load_more.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'src/hocs/with_load_more')
diff --git a/src/hocs/with_load_more/with_load_more.js b/src/hocs/with_load_more/with_load_more.js
index 8877f8d3..28c741e3 100644
--- a/src/hocs/with_load_more/with_load_more.js
+++ b/src/hocs/with_load_more/with_load_more.js
@@ -3,8 +3,8 @@ import filter from 'lodash/filter'
import isEmpty from 'lodash/isEmpty'
import './with_load_more.scss'
-const withLoadMore = (Component, fetch, select, entriesPropName = 'entries') => {
- const originalProps = Component.props || []
+const withLoadMore = ({ fetch, select, entriesPropName = 'entries' }) => (WrappedComponent) => {
+ const originalProps = WrappedComponent.props || []
const props = filter(originalProps, v => v !== 'entries')
return Vue.component('withLoadMore', {
@@ -18,7 +18,7 @@ const withLoadMore = (Component, fetch, select, entriesPropName = 'entries') =>
}
return (
-
+