Frontend verify / commits (pull_request) Successful in 29s
Frontend verify / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 8m54s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 12s
Frontend verify / verify (push) Successful in 9m59s
20 lines
632 B
TypeScript
20 lines
632 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 />;
|
|
|
|
return viewModel.state === "error"
|
|
? <TbankConnectionError retry={viewModel.retry} />
|
|
: <TbankConnectionSectionLoaded {...viewModel} />;
|
|
};
|
|
|
|
export { TbankConnectionSection };
|