fix: adjust swr option
This commit is contained in:
parent
db99b4cb54
commit
630249d22a
@ -76,7 +76,7 @@ const Layout = () => {
|
|||||||
}, [language]);
|
}, [language]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SWRConfig value={{}}>
|
<SWRConfig value={{ errorRetryCount: 3 }}>
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<Paper
|
<Paper
|
||||||
square
|
square
|
||||||
|
@ -27,6 +27,7 @@ export const getAxios = async (force: boolean = false) => {
|
|||||||
axiosIns = axios.create({
|
axiosIns = axios.create({
|
||||||
baseURL: `http://${server}`,
|
baseURL: `http://${server}`,
|
||||||
headers: secret ? { Authorization: `Bearer ${secret}` } : {},
|
headers: secret ? { Authorization: `Bearer ${secret}` } : {},
|
||||||
|
timeout: 15000,
|
||||||
});
|
});
|
||||||
axiosIns.interceptors.response.use((r) => r.data);
|
axiosIns.interceptors.response.use((r) => r.data);
|
||||||
return axiosIns;
|
return axiosIns;
|
||||||
|
Loading…
Reference in New Issue
Block a user