'use client'
//export const url= 'http://localhost/kt-api/';

export const url= 'https://api-v2.kigaliphoneskt.com/';
//export const url= 'http://localhost/api-v2.kigaliphoneskt.com/';


import axios from "axios";



export const client = axios.create({
    //baseURL : 'http://localhost/kt-api/',
    baseURL : 'https://api-v2.kigaliphoneskt.com/',
    //baseURL : 'http://localhost/api-v2.kigaliphoneskt.com/',
    headers: {
        'Content-Type': 'application/json',
    }
})

const axiosInstance =  axios.create({
    baseURL: url, // Replace with your API base URL
    headers: { 'Content-Type': 'application/json' }
  });
  
  axiosInstance.interceptors.request.use(
    async function (config) {
      return config;
    },
    function (error) {
      // Handle the error
      return Promise.reject(error);
    }
  );
  
  export default axiosInstance;