import axios from "axios";

const baseURL = process.env.NEXT_PUBLIC_BASE_URL; // Use NEXT_PUBLIC_ prefix for client access

if (!baseURL) {
  console.error("NEXT_PUBLIC_BASE_URL is not defined in the environment file.");
}

export const axiosInstance = axios.create({
  baseURL, 
  withCredentials: true,
});
