Files
frontend/src/pages/accounts/ui/AccountsPage/AccountsPage.tsx
T
codex-bot 2db39f25d9
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 11s
Frontend verify / verify (push) Failing after 8m19s
refactor: normalize view models and share breadcrumbs and titles (WealthLedger/frontend#143) (#153)
2026-11-04 21:14:29 +03:00

25 lines
780 B
TypeScript

import type { FC } from "react";
import { useAccountsPageVm } from "./AccountsPage.vm";
import { AccountsPageEmpty } from "./components/AccountsPageEmpty.view";
import { AccountsPageError } from "./components/AccountsPageError.view";
import { AccountsPageLoaded } from "./components/AccountsPageLoaded.view";
import { AccountsPageLoading } from "./components/AccountsPageLoading.view";
const AccountsPage: FC = () => {
const vm = useAccountsPageVm();
if (vm.state === "loading") return <AccountsPageLoading />;
if (vm.state === "error") return <AccountsPageError {...vm} />;
if (vm.state === "empty") return <AccountsPageEmpty />;
return (
<AccountsPageLoaded
accounts={vm.accounts}
meta={vm.meta}
readRetry={vm.readRetry}
/>
);
};
export { AccountsPage };