Comprehensive frontend fixes: Updated gitignore, fixed all import paths, enhanced lib utilities
49e7bf6 | export const API_BASE_URL = 'https://example.com/api'; // Base URL for your API | |
| // Default request timeout in milliseconds | |
| export const TIMEOUT = 5000; | |
| // Default headers for API requests | |
| export const DEFAULT_HEADERS = { | |
| 'Content-Type': 'application/json', | |
| Accept: 'application/json', | |
| }; | |
| // Helper to build full API URLs | |
| export const buildApiUrl = (path: string) => { | |
| const trimmedPath = path.startsWith('/') ? path.slice(1) : path; | |
| return `${API_BASE_URL}/${trimmedPath}`; | |
| }; | |
| // Common API endpoints | |
| export const ENDPOINTS = { | |
| USERS: 'users', | |
| POSTS: 'posts', | |
| AUTH_LOGIN: 'auth/login', | |
| AUTH_REGISTER: 'auth/register', | |
| }; | |