hook up offline banner

This commit is contained in:
Alex Holliday committed 2026-02-10 23:53:06 +00:00
1 parent 0503c25663
commit 10bfdc9da1
6 files changed
+59 -211

No files matched your search

+5 -1
View File
@@ -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") {