This commit is contained in:
@@ -2,7 +2,7 @@ import axios from "axios";
|
|||||||
import { getToken, getAdminToken } from "../auth/tokenStorage";
|
import { getToken, getAdminToken } from "../auth/tokenStorage";
|
||||||
|
|
||||||
export const API_BASE_URL =
|
export const API_BASE_URL =
|
||||||
process.env.EXPO_PUBLIC_API_URL ?? "https://uber-demo.club";
|
process.env.EXPO_PUBLIC_API_URL ?? "https://mln-uber.club";
|
||||||
|
|
||||||
const apiClient = axios.create({
|
const apiClient = axios.create({
|
||||||
baseURL: API_BASE_URL,
|
baseURL: API_BASE_URL,
|
||||||
|
|||||||
@@ -220,5 +220,3 @@ export function useCart() {
|
|||||||
if (!context) throw new Error("useCart must be used within a CartProvider");
|
if (!context) throw new Error("useCart must be used within a CartProvider");
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ export function NotificationProvider({ children }: { children: ReactNode }) {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// Polling toutes les 15 secondes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchNotifications();
|
fetchNotifications();
|
||||||
const interval = setInterval(fetchNotifications, 15000);
|
const interval = setInterval(fetchNotifications, 15000);
|
||||||
|
|||||||
Reference in New Issue
Block a user