Frontend security / security (push) Successful in 10s
Frontend verify / verify (push) Successful in 4m57s
Conventional commits / commits (pull_request) Successful in 28s
Frontend security / security (pull_request) Successful in 10s
Frontend verify / verify (pull_request) Successful in 5m10s
Repair investment recovery, draft preservation, date validation, currency presentation, accessibility, and route error recovery. Correct Docker and dependency checks and consume explicit income roles.
22 lines
617 B
TypeScript
22 lines
617 B
TypeScript
import { useAuthenticatedQuery } from "@/shared/api";
|
|
import { tbankConnectionQueryOptions } from "../../model/connection-boundary";
|
|
|
|
function useTbankConnectionViewModel() {
|
|
const status = useAuthenticatedQuery({
|
|
...tbankConnectionQueryOptions(),
|
|
});
|
|
if (!status.data) {
|
|
if (status.isPending) return { state: "loading" as const };
|
|
return { state: "error" as const, retry: () => status.refetch() };
|
|
}
|
|
return {
|
|
state: "loaded" as const,
|
|
status: status.data,
|
|
refreshing: status.isFetching,
|
|
refreshError: status.isError,
|
|
retry: () => status.refetch(),
|
|
};
|
|
}
|
|
|
|
export { useTbankConnectionViewModel };
|