From da36f25fd092b9fed572c61c4e85eaf43f2167c8 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Thu, 12 May 2022 12:05:34 -0500 Subject: [PATCH] fix swr fetcher --- web/src/api/index.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/web/src/api/index.jsx b/web/src/api/index.jsx index 6e1db4388..427c65119 100644 --- a/web/src/api/index.jsx +++ b/web/src/api/index.jsx @@ -10,13 +10,7 @@ export function ApiProvider({ children, options }) { return ( { - if (typeof arg === 'string') { - return axios.get(arg).then((res) => res.data); - } - const [path, params] = arg; - return axios.get(path, { params }).then((res) => res.data); - }, + fetcher: (path, params) => axios.get(path, { params }).then((res) => res.data), ...options, }} >