Create basic couple route

This commit is contained in:
2023-08-16 12:17:04 +02:00
parent 0652fbadc8
commit 328eada9ec
6 changed files with 668 additions and 0 deletions

View File

@ -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

View 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}
/>
);
}