proper seo file routing

This commit is contained in:
2ManyProjects 2025-05-07 20:44:38 -05:00
parent bfe3bb2c71
commit 384f5df17c

View file

@ -1,15 +1,20 @@
import axios from 'axios'; import axios from 'axios';
import { store } from '../store'; import { store } from '../store';
// Create the base axios instance let url = "";
if(import.meta.env.VITE_ENVIRONMENT === "beta"){
url = import.meta.env.VITE_API_URL.split('/api')[0]
}else {
url = `https://${import.meta.env.VITE_API_PROD_URL}`
}
const axiosClient = axios.create({ const axiosClient = axios.create({
baseURL: import.meta.env.VITE_API_URL.split('/api')[0], baseURL: url,
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },
}); });
// console.log(url, `https://${import.meta.env.VITE_API_PROD_URL}`)
// Add request interceptor to include API key in headers if available
axiosClient.interceptors.request.use( axiosClient.interceptors.request.use(
(config) => { (config) => {
const state = store.getState(); const state = store.getState();