Updated loading states and error states accross app
This commit is contained in:
@@ -17,10 +17,6 @@ export const AlertHitProvider = ({ children }: AlertHitProviderTypeProps) => {
|
||||
query?.data?.alertHistory?.forEach((element: SightingType) => {
|
||||
dispatch({ type: "ADD", payload: element });
|
||||
});
|
||||
} else if (query.error) {
|
||||
console.error("Error fetching alert hits:", query.error);
|
||||
} else {
|
||||
console.log("Loading alert hits...");
|
||||
}
|
||||
}, [query.data, query.error, query.isLoading]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user