From b487c6f028cf3052a41d7474e1960753a6893520 Mon Sep 17 00:00:00 2001 From: Gabriel Lopez Date: Sat, 12 Aug 2023 14:19:24 +1200 Subject: [PATCH] Chore: Sleep API request only if in dev mode --- client/src/app/api/agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/api/agent.ts b/client/src/app/api/agent.ts index 66cbe86..a8402f0 100644 --- a/client/src/app/api/agent.ts +++ b/client/src/app/api/agent.ts @@ -9,7 +9,7 @@ const responseBody = (response: AxiosResponse) => response.data; axios.interceptors.response.use( async (res) => { - await sleep(); + if (import.meta.env.MODE === "development") await sleep(); return res; }, (error: AxiosError) => {