Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {Alert, Text, View} from 'react-native';
- import APIError from './APIError';
- import InvalidVersionAlert from '@src/components/atoms/InvalidVersionAlert';
- import ActionSheet from 'react-native-actionsheet';
- import {useRef} from 'react';
- interface ErrorProps {
- error: APIError;
- delegate?: any;
- }
- const handleError = ({error, delegate}: ErrorProps) => {
- if (error instanceof APIError && error.code === 409) {
- invalidVersionAlert(error, delegate);
- }
- function invalidVersionAlert(error: Error, delegate: any) {
- console.log('Badal comes here =====>');
- const message = `Invalid version: ${error.message}`;
- }
- };
- export default handleError;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement