// axios-config.js
import axios from "axios";
import { getTokenFromLocalStorage } from "./token";

/*
const instance = axios.create({
    baseURL: process.env.NEXT_PUBLIC_API_URL,
    headers: {
        "Content-Type": "application/json",
        Authorization: getTokenFromLocalStorage(),
    },
});*/

const instance = () =>
    axios.create({
        baseURL: process.env.NEXT_PUBLIC_API_URL,
        headers: {
            "Content-Type": "application/json",
            Authorization: getTokenFromLocalStorage(),
        },
    });

export default instance;
