Continuing updating the reformatting of propTypes and set redux, intl functions to end of component

• Removing:
- the reformatting of propTypes and set redux, intl functions to end of component
This commit is contained in:
mgabdev
2020-08-17 19:57:35 -05:00
parent 46a0cbca7d
commit ddca693cfc
101 changed files with 2053 additions and 2140 deletions

View File

@@ -10,30 +10,12 @@ import LoadMore from './load_more'
const MOUSE_IDLE_DELAY = 300
export default class ScrollableList extends React.PureComponent {
class ScrollableList extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
}
static propTypes = {
scrollKey: PropTypes.string.isRequired,
onLoadMore: PropTypes.func,
onReload: PropTypes.func,
isLoading: PropTypes.bool,
showLoading: PropTypes.bool,
hasMore: PropTypes.bool,
emptyMessage: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]),
children: PropTypes.node,
onScrollToTop: PropTypes.func,
onScroll: PropTypes.func,
placeholderComponent: PropTypes.node,
placeholderCount: PropTypes.node,
}
state = {
pullToRefreshTriggered: false,
cachedMediaWidth: 250, // Default media/card width using default Gab Social theme
@@ -298,3 +280,22 @@ export default class ScrollableList extends React.PureComponent {
}
ScrollableList.propTypes = {
scrollKey: PropTypes.string.isRequired,
onLoadMore: PropTypes.func,
onReload: PropTypes.func,
isLoading: PropTypes.bool,
showLoading: PropTypes.bool,
hasMore: PropTypes.bool,
emptyMessage: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]),
children: PropTypes.node,
onScrollToTop: PropTypes.func,
onScroll: PropTypes.func,
placeholderComponent: PropTypes.node,
placeholderCount: PropTypes.node,
}
export default ScrollableList