mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 14:44:21 +00:00
Throw errors occouring in SWR
This commit is contained in:
parent
e78532243d
commit
ba531bba9b
1 changed files with 9 additions and 3 deletions
|
@ -48,9 +48,15 @@ export type AxiosSWRFetcherProviderProps = {
|
|||
*/
|
||||
export const AxiosSWRFetcherProvider = ({ children }: AxiosSWRFetcherProviderProps) => {
|
||||
return (
|
||||
<SWRConfig value={{ fetcher: useAxiosSWRFetcher() }}>
|
||||
{children}
|
||||
</SWRConfig>
|
||||
<SWRConfig
|
||||
value={{
|
||||
fetcher: useAxiosSWRFetcher(),
|
||||
onError: (error, key) => {
|
||||
throw error
|
||||
},
|
||||
}}
|
||||
children={children}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue