diff --git a/src/screens/Services/ServicesSectionScreen.js b/src/screens/Services/ServicesSectionScreen.js index 78bad25..427eea8 100644 --- a/src/screens/Services/ServicesSectionScreen.js +++ b/src/screens/Services/ServicesSectionScreen.js @@ -6,10 +6,7 @@ import CustomTabBar from "../../components/Tabbar/CustomTabBar"; import {withCollapsible} from "../../utils/withCollapsible"; import {Collapsible} from "react-navigation-collapsible"; import {CommonActions} from "@react-navigation/native"; -import ConnectionManager from "../../managers/ConnectionManager"; import type {listItem} from "./ServicesScreen"; -import ErrorView from "../../components/Screens/ErrorView"; -import {ERROR_TYPE} from "../../utils/WebData"; type Props = { navigation: Object, @@ -17,29 +14,13 @@ type Props = { collapsibleStack: Collapsible, } -type State = { - isLoggedIn: boolean, -} - -class ServicesSectionScreen extends React.Component { +class ServicesSectionScreen extends React.Component { finalDataset: listItem; constructor(props) { super(props); this.handleNavigationParams(); - this.state = { - isLoggedIn: ConnectionManager.getInstance().isLoggedIn(), - } - } - - componentDidMount() { - this.props.navigation.addListener('focus', this.onFocus); - - } - - onFocus = () => { - this.setState({isLoggedIn: ConnectionManager.getInstance().isLoggedIn()}) } handleNavigationParams() { @@ -57,19 +38,16 @@ class ServicesSectionScreen extends React.Component { render() { const {containerPaddingTop, scrollIndicatorInsetTop, onScroll} = this.props.collapsibleStack; - if (!this.state.isLoggedIn && this.finalDataset.shouldLogin) - return ; - else - return + return } }