chore: migrate to monorepo

This commit is contained in:
Satyajit Sahoo
2020-02-07 23:20:57 +01:00
parent a7305b1413
commit 72e8160537
477 changed files with 155789 additions and 170280 deletions

View File

@@ -2,14 +2,12 @@ import React from 'react';
import hoistStatics from 'hoist-non-react-statics';
import { withNavigation } from '@react-navigation/core';
export default function createNavigationAwareScrollable(Component: any) {
export default function createNavigationAwareScrollable(Component) {
const ComponentWithNavigationScrolling = withNavigation(
class extends React.PureComponent<any> {
static displayName = `withNavigationScrolling(${Component.displayName ||
Component.name})`;
_subscription: any;
componentDidMount() {
this._subscription = this.props.navigation.addListener(
'refocus',
@@ -28,6 +26,12 @@ export default function createNavigationAwareScrollable(Component: any) {
);
}
componentWillUnmount() {
if (this._subscription != null) {
this._subscription.remove();
}
}
getNode() {
if (this._scrollRef === null) {
return null;
@@ -42,12 +46,6 @@ export default function createNavigationAwareScrollable(Component: any) {
}
}
componentWillUnmount() {
if (this._subscription != null) {
this._subscription.remove();
}
}
render() {
return (
<Component