import { AxiosError } from "axios";
import Config from 'react-native-config'

/**
 * Array that maps {@linkcode landmark_type} from {@link Landmark} to a string representing that landmark type.
 */
 export const reportAxiosError = (desc: string,  error: AxiosError, printResponse?: boolean) => {
    let errorString = `XHR error: ${desc}\nError code: ${error.response?.status}\nError message: ${error.message}`;

    if (printResponse) {
        errorString + "\nError response: " + error.response;
    }

    console.error(errorString);
}

/**
 * Change the api url here
 */
//export const API_URL = 'http://192.168.1.71:8000'
export const API_URL = 'https://app.clicknpush.ca'