Fix: Y Axis Chart Width
This commit is contained in:
@@ -14,11 +14,9 @@ export function useApiData<T>(endpoint: string) {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
// --- V CORRECCIÓN DEFINITIVA V ---
|
||||
// Construimos la URL completa y absoluta para la llamada.
|
||||
const fullUrl = `${API_ROOT}${endpoint}`;
|
||||
const response = await apiClient.get<T>(fullUrl);
|
||||
// --- ^ CORRECCIÓN DEFINITIVA ^ ---
|
||||
setData(response.data);
|
||||
} catch (err) {
|
||||
if (err instanceof AxiosError) {
|
||||
|
||||
Reference in New Issue
Block a user