import { Button } from "@mantine/core"; import { StateView } from "@wealthledger/ui"; import type { FC } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router"; type AccountPageErrorProps = { code?: string; retry: () => void }; const AccountPageError: FC = (props) => { const { code, retry } = props; const { t } = useTranslation(); if (code === "NOT_FOUND") return ( {t("portfolio.back")} } /> ); if (code === "TBANK_NOT_CONNECTED" || code === "INVALID_TBANK_TOKEN") return ( {t("accounts.openSettings")} } /> ); if (code === "TBANK_UNAVAILABLE") return ( {t("accounts.retry")}} /> ); return ( {t("accounts.retry")}} /> ); }; export { AccountPageError };