import { useQuery } from "@tanstack/react-query"; import { getLisaSummary } from "@/api/pensions"; import { formatCurrency } from "@/utils/currency"; import { AlertTriangle, Gift, Info } from "lucide-react"; function taxYearDisplay(year: number): string { return `${year - 1}/${String(year).slice(2)}`; } interface Props { accountId: string; } export default function LisaInfoCard({ accountId }: Props) { const { data, isLoading, isError } = useQuery({ queryKey: ["lisa-summary", accountId], queryFn: () => getLisaSummary(accountId), retry: false, }); if (isLoading) { return (
Total contributed
{formatCurrency(data.total_contributions, "GBP")}
Total bonus expected
+{formatCurrency(data.total_bonus_expected, "GBP")}
Withdrawing before age 60 (except for first-home purchase up to £450k) incurs a{" "} 25% penalty on the full withdrawal amount. Because the fund includes the government bonus, the effective loss can exceed the bonus itself.
If you withdrew the full balance today, the penalty would be approximately{" "} {formatCurrency(data.withdrawal_penalty_amount, "GBP")}.