
import { Alert } from 'react-native';
export default function session(response,error_status, navigation) {

    if (response.code === "WRONG_SESSION_ID") {

        Alert.alert(
            'Session',
            'Session Anda Sudah Habis Silahkan Logout Terlebih Dahulu ! ',
            [

                { text: 'OK', onPress: () => navigation.replace('Login') }

            ]
        )
    } else if (error_status == 500) {
        Alert.alert(
            'Server',
            'Server Error ',
            [

                { text: 'OK' }

            ]
        )
    }else{
        Alert.alert(response_data.msg);
    }
}