diff --git a/portal/src/analysis/components/net_worth/Graphs.tsx b/portal/src/analysis/components/net_worth/Graphs.tsx index a74ae38..37e0b96 100644 --- a/portal/src/analysis/components/net_worth/Graphs.tsx +++ b/portal/src/analysis/components/net_worth/Graphs.tsx @@ -47,7 +47,7 @@ export function Graphs({data, calc}: { y: data.firstYear.netWorth.amount + calc.nextYearForInversion }], }]; - }, [data]); + }, [data, calc]); const incomeIncrease = useMemo(() => { return [{ diff --git a/portal/src/components/person_cards/DDJJ.tsx b/portal/src/components/person_cards/DDJJ.tsx index 559023f..f5f7b84 100644 --- a/portal/src/components/person_cards/DDJJ.tsx +++ b/portal/src/components/person_cards/DDJJ.tsx @@ -1,19 +1,30 @@ import {Affidavit} from "../../Model"; -import {Card, Col, Table, Typography} from "antd"; +import {Button, Card, Col, Table, Tooltip, Typography} from "antd"; import Icon from "@ant-design/icons"; import {ReactComponent as Ddjj} from "../../assets/logos/ddjj.svg"; import * as React from "react"; import {formatMoney} from "../../formatters"; import './DDJJ.css' import {SOURCE_NAME_MAP} from "../../pages/PersonSearchPage"; +import {Link} from "react-router-dom"; export function DDJJCard(props: { affidavit: Affidavit[] }) { + if (!props.affidavit + || props.affidavit.length === 0 + ) return null; + const affidavit = props.affidavit; + const first = props.affidavit[0] return <>