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
18 lines
649 B
TypeScript
18 lines
649 B
TypeScript
import type { FC } from "react";
|
|
import {
|
|
TbankConnectionError,
|
|
TbankConnectionLoading,
|
|
} from "./TbankConnectionSection.view";
|
|
import { useTbankConnectionViewModel } from "./TbankConnectionSection.vm";
|
|
import { TbankConnectionSectionLoaded } from "./TbankConnectionSectionLoaded";
|
|
|
|
const TbankConnectionSection: FC = () => {
|
|
const viewModel = useTbankConnectionViewModel();
|
|
if (viewModel.state === "loading") return <TbankConnectionLoading />;
|
|
if (viewModel.state === "error")
|
|
return <TbankConnectionError retry={viewModel.retry} />;
|
|
return <TbankConnectionSectionLoaded status={viewModel.status} />;
|
|
};
|
|
|
|
export { TbankConnectionSection };
|