refactor: colocate frontend component files
Frontend security / security (push) Successful in 9s
Frontend verify / verify (push) Successful in 5m10s
Conventional commits / commits (pull_request) Successful in 25s
Frontend security / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 5m10s
Frontend security / security (push) Successful in 9s
Frontend verify / verify (push) Successful in 5m10s
Conventional commits / commits (pull_request) Successful in 25s
Frontend security / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 5m10s
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { useAuthenticatedQuery } from "@/shared/api";
|
||||
import { tbankConnectionQueryOptions } from "../../model/connection-boundary";
|
||||
|
||||
function useTbankConnectionViewModel() {
|
||||
const status = useAuthenticatedQuery({
|
||||
...tbankConnectionQueryOptions(),
|
||||
});
|
||||
if (status.isPending) return { state: "loading" as const };
|
||||
if (status.isError)
|
||||
return { state: "error" as const, retry: () => status.refetch() };
|
||||
return { state: "loaded" as const, status: status.data };
|
||||
}
|
||||
|
||||
export { useTbankConnectionViewModel };
|
||||
Reference in New Issue
Block a user