Create basic couple route
This commit is contained in:
@ -38,6 +38,7 @@ interface FamilyContext {
|
||||
familyId: number;
|
||||
reloadFamilyInfo: () => void;
|
||||
reloadMembersList: () => Promise<void>;
|
||||
reloadCouplesList: () => Promise<void>;
|
||||
}
|
||||
|
||||
const FamilyContextK = React.createContext<FamilyContext | null>(null);
|
||||
@ -116,6 +117,7 @@ export function BaseFamilyRoute(): React.ReactElement {
|
||||
familyId: family!.family_id,
|
||||
reloadFamilyInfo: onReload,
|
||||
reloadMembersList: onReload,
|
||||
reloadCouplesList: onReload,
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
|
19
geneit_app/src/widgets/CouplePhoto.tsx
Normal file
19
geneit_app/src/widgets/CouplePhoto.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import { Avatar } from "@mui/material";
|
||||
import { Couple } from "../api/CoupleApi";
|
||||
|
||||
export function CouplePhoto(p: {
|
||||
couple: Couple;
|
||||
width?: number;
|
||||
}): React.ReactElement {
|
||||
return (
|
||||
<Avatar
|
||||
sx={
|
||||
p.width
|
||||
? { width: `${p.width}px`, height: "auto", display: "inline-block" }
|
||||
: undefined
|
||||
}
|
||||
variant="rounded"
|
||||
src={p.couple.thumbnailURL ?? undefined}
|
||||
/>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user