Skip to content

Commit

Permalink
Update axios configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kitloong committed Dec 27, 2023
1 parent edc62c8 commit ba6d630
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hooks/useSWRAxios.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import useSWR from 'swr'
import axios, {
AxiosError,
AxiosError, AxiosHeaders,
AxiosRequestConfig,
AxiosResponse,
AxiosResponseTransformer,
Expand All @@ -26,7 +26,9 @@ export default function useSWRAxios<T>(
headers: {},
status: 200,
statusText: 'Initial',
config: {},
config: {
headers: new AxiosHeaders(),
},
}

const fallbackData: AxiosResponse<T> = { ...initFallbackData, ...axiosFallbackData }
Expand Down

0 comments on commit ba6d630

Please sign in to comment.