fix(ui): reduce reconnect requests

- Add checks to the "recovery" logic for socket connect events to reduce the number of network requests.
- Remove the `isInitialized` state from `systemSlice` and make it a nanostore local to the socketConnected listener. It didn't need to be global state. It's also now more clearly named `isFirstConnection`.
- Export the queue status selector (minor improvement, memoizes it correctly).
This commit is contained in:
psychedelicious
2024-01-09 11:26:34 +11:00
parent 7fc08962fb
commit 7dea079220
5 changed files with 87 additions and 19 deletions

View File

@ -339,6 +339,8 @@ export const {
useGetBatchStatusQuery,
} = queueApi;
export const selectQueueStatus = queueApi.endpoints.getQueueStatus.select();
const resetListQueryData = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
dispatch: ThunkDispatch<any, any, UnknownAction>