mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 22:54:22 +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) => {
|
export const AxiosSWRFetcherProvider = ({ children }: AxiosSWRFetcherProviderProps) => {
|
||||||
return (
|
return (
|
||||||
<SWRConfig value={{ fetcher: useAxiosSWRFetcher() }}>
|
<SWRConfig
|
||||||
{children}
|
value={{
|
||||||
</SWRConfig>
|
fetcher: useAxiosSWRFetcher(),
|
||||||
|
onError: (error, key) => {
|
||||||
|
throw error
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
children={children}
|
||||||
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue