refactor: enforce frontend view model boundaries
This commit is contained in:
+5
-1
@@ -6,9 +6,13 @@ function useTbankConnectionViewModel() {
|
||||
const status = useAuthenticatedQuery({
|
||||
...tbankConnectionQueryOptions(),
|
||||
});
|
||||
|
||||
if (!status.data) {
|
||||
return status.isPending ? { state: "loading" as const } : { retry: () => status.refetch(), state: "error" as const };
|
||||
return status.isPending
|
||||
? { state: "loading" as const }
|
||||
: { retry: () => status.refetch(), state: "error" as const };
|
||||
}
|
||||
|
||||
return {
|
||||
refreshError: status.isError,
|
||||
refreshing: status.isFetching,
|
||||
|
||||
Reference in New Issue
Block a user