fix: use environment variable for API URL

This commit is contained in:
Xavier Oliveira
2026-05-28 14:41:32 +01:00
parent cf916eabb3
commit 82de11a99f
32 changed files with 98 additions and 65 deletions

View File

@@ -1,3 +1,4 @@
import API_URL from "../config/api";
import type { User } from "../types";
@@ -9,7 +10,7 @@ interface ApiUserResponse {
export function useGetCurrentUser() {
async function getCurrentUser(): Promise<ApiUserResponse> {
const response = await fetch("http://127.0.0.1:8000/api/me", {
const response = await fetch(`${API_URL}/api/me`, {
method: "GET",
headers: {
Accept: "application/json",