import React from "react";
import {get_item,set_item,clear_item} from '../components/localStorage';
import { mapStateToProps,mapDispatchToProps } from '../reducers/contextProvider';
import { connect} from 'react-redux';
import {BackHandler} from 'react-native';
// import RNExitApp from 'react-native-exit-app';

export async function logout(props){
   
    const pdata={islogin:false,SecurityToken:''};    
    props.navigation.reset({index: 0,routes: [{name: "MpinLogin"}],});
    // props.set_session(pdata);  

    // clear_item('islogin'); 
    // clear_item('loginToken');
    // clear_item('loginInfo');
    
    // BackHandler.exitApp();
    // RNExitApp.exitApp();
    
}

// export default connect(mapStateToProps, mapDispatchToProps)(logout)