chore: useApi added to the components

This commit is contained in:
2025-08-15 22:08:31 +03:30
parent e7b596005b
commit 07eb2e7d64
18 changed files with 237 additions and 185 deletions

View File

@@ -1,11 +1,11 @@
import axios from 'axios';
// Function to get the token from local storage or state management
const getToken = () => localStorage.getItem('authToken');
const getToken = () => sessionStorage.getItem('authToken');
const apiClient = axios.create({
// Define the base URL for all API requests
baseURL: 'https://accounts.business-harmony.com/swagger/index.html',
baseURL: 'https://accounts.business-harmony.com/api/',
// Set a timeout for requests (e.g., 10 seconds)
timeout: 10000,