diff --git a/geneit_app/src/widgets/BasicFamilyTree.tsx b/geneit_app/src/widgets/BasicFamilyTree.tsx index df1fbfe..ad3ef02 100644 --- a/geneit_app/src/widgets/BasicFamilyTree.tsx +++ b/geneit_app/src/widgets/BasicFamilyTree.tsx @@ -1,13 +1,15 @@ -import { TreeItem, TreeView } from "@mui/lab"; -import { FamilyTreeNode } from "../utils/family_tree"; -import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; -import ChevronRightIcon from "@mui/icons-material/ChevronRight"; -import React from "react"; -import { MemberPhoto } from "./MemberPhoto"; -import { Member, fmtDate } from "../api/MemberApi"; -import Icon from "@mdi/react"; import { mdiBabyCarriage, mdiCross } from "@mdi/js"; +import Icon from "@mdi/react"; +import ChevronRightIcon from "@mui/icons-material/ChevronRight"; +import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; +import { TreeItem, TreeView } from "@mui/lab"; +import React from "react"; +import { useNavigate } from "react-router-dom"; import { Couple } from "../api/CoupleApi"; +import { Member, fmtDate } from "../api/MemberApi"; +import { FamilyTreeNode } from "../utils/family_tree"; +import { useFamily } from "./BaseFamilyRoute"; +import { MemberPhoto } from "./MemberPhoto"; export function BasicFamilyTree(p: { tree: FamilyTreeNode; @@ -65,8 +67,14 @@ function BasicFamilyMemberItem(p: { primary?: boolean; couple?: Couple; }): React.ReactElement { + const family = useFamily(); + const n = useNavigate(); + return ( -