21 lines
740 B
TypeScript
21 lines
740 B
TypeScript
import type { FC } from "react";
|
|
|
|
import { useAccountOperationsPageVm } from "./AccountOperationsPage.vm";
|
|
import { AccountOperationsPageError } from "./components/AccountOperationsPageError.view";
|
|
import { AccountOperationsPageLoaded } from "./components/AccountOperationsPageLoaded.view";
|
|
import { AccountOperationsPageLoading } from "./components/AccountOperationsPageLoading.view";
|
|
|
|
const AccountOperationsPage: FC = () => {
|
|
const viewModel = useAccountOperationsPageVm();
|
|
|
|
if (viewModel.state === "loading") {
|
|
return <AccountOperationsPageLoading />;
|
|
}
|
|
|
|
return viewModel.state === "error"
|
|
? <AccountOperationsPageError {...viewModel} />
|
|
: <AccountOperationsPageLoaded {...viewModel} />;
|
|
};
|
|
|
|
export { AccountOperationsPage };
|