hook up offline banner
This commit is contained in:
1 parent
0503c25663
commit
10bfdc9da1
6 files changed
+59
-211
No files matched your search
@@ -48,7 +48,11 @@ export const initApiClient = (store: StoreType): void => {
|
||||
}
|
||||
);
|
||||
|
||||
const onSuccess = (response: AxiosResponse) => response;
|
||||
const onSuccess = (response: AxiosResponse) => {
|
||||
// Server is reachable, hide offline banner if shown
|
||||
serverUnreachableCallback?.(false);
|
||||
return response;
|
||||
};
|
||||
const onError = (error: AxiosError) => {
|
||||
// Handle network errors (server unreachable)
|
||||
if (error.code === "ERR_NETWORK") {
|
||||
|
||||
Reference in new issue
Block a user