add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

16
src/utils/api.js Normal file
View File

@@ -0,0 +1,16 @@
import axios from 'axios';
export const API_BASE_URL = import.meta.env.VITE_BASE_URL || 'http://localhost:8000';
const api = axios.create({ baseURL: API_BASE_URL });
// Add token to requests if available
api.interceptors.request.use((config) => {
const token = localStorage.getItem('token');
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
});
export default api;