GyDi 2 жил өмнө
parent
commit
630249d22a

+ 1 - 1
src/pages/_layout.tsx

@@ -76,7 +76,7 @@ const Layout = () => {
   }, [language]);
 
   return (
-    <SWRConfig value={{}}>
+    <SWRConfig value={{ errorRetryCount: 3 }}>
       <ThemeProvider theme={theme}>
         <Paper
           square

+ 1 - 0
src/services/api.ts

@@ -27,6 +27,7 @@ export const getAxios = async (force: boolean = false) => {
   axiosIns = axios.create({
     baseURL: `http://${server}`,
     headers: secret ? { Authorization: `Bearer ${secret}` } : {},
+    timeout: 15000,
   });
   axiosIns.interceptors.response.use((r) => r.data);
   return axiosIns;