18 lines
641 B
TypeScript
18 lines
641 B
TypeScript
import type { FC } from "react";
|
|
|
|
import { useAccountIncomePageVm } from "./AccountIncomePage.vm";
|
|
import { AccountIncomePageError } from "./components/AccountIncomePageError.view";
|
|
import { AccountIncomePageLoaded } from "./components/AccountIncomePageLoaded.view";
|
|
import { AccountIncomePageLoading } from "./components/AccountIncomePageLoading.view";
|
|
|
|
const AccountIncomePage: FC = () => {
|
|
const vm = useAccountIncomePageVm();
|
|
if (vm.state === "loading") return <AccountIncomePageLoading />;
|
|
|
|
return vm.state === "error"
|
|
? <AccountIncomePageError {...vm} />
|
|
: <AccountIncomePageLoaded {...vm} />;
|
|
};
|
|
|
|
export { AccountIncomePage };
|