import { Alert, Button, Group, Loader, Stack, Text, Title, } from "@mantine/core"; import { StateView } from "@wealthledger/ui"; import type { FC } from "react"; import { FormProvider } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { formatSnapshotTime } from "@/shared/lib"; import classes from "../AccountIncomePage.module.css"; import type { AccountIncomePageViewModel } from "../AccountIncomePage.vm"; import { IncomeComparisons } from "./IncomeComparisons.view"; import { IncomePayments } from "./IncomePayments.view"; import { IncomePeriodForm } from "./IncomePeriodForm/IncomePeriodForm.view"; import { IncomeSummary } from "./IncomeSummary.view"; type LoadedProps = Extract; const AccountIncomePageLoaded: FC = (props) => { const { analytics, display, form, refreshing, refreshError, retry, onSubmit, onReset, } = props; const { t } = useTranslation(); return ( {props.lastSuccessfulAt ? ( {t("investment.sourceTime", { date: formatSnapshotTime(props.lastSuccessfulAt), })} ) : null} {t("income.title")} {refreshing ? ( {t("income.refreshing")} ) : null} {refreshError ? ( {t( props.sourceError ? "investment.syncFailed" : "income.refreshError", )} ) : null} {props.partial ? ( {t("investment.partial")} ) : analytics.totalsByCurrency.length ? ( ) : ( )} {t("income.taxBoundary")} ); }; export { AccountIncomePageLoaded };