18 lines
690 B
TypeScript
18 lines
690 B
TypeScript
import type { FC } from "react";
|
|
|
|
import { useAccountIncomePageViewModel } 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 viewModel = useAccountIncomePageViewModel();
|
|
if (viewModel.state === "loading") return <AccountIncomePageLoading />;
|
|
|
|
return viewModel.state === "error"
|
|
? <AccountIncomePageError {...viewModel} />
|
|
: <AccountIncomePageLoaded {...viewModel} />;
|
|
};
|
|
|
|
export { AccountIncomePage };
|