chore: useApi added to the components
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user