1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-10-16 15:07:27 +00:00

Throw errors occouring in SWR

This commit is contained in:
Steffo 2022-07-19 19:53:52 +02:00
parent e78532243d
commit ba531bba9b
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -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}
/>
) )
} }