Use different aspect ratio for single member and couple
This commit is contained in:
@@ -15,6 +15,7 @@ export function ImageCropperDialog(p: {
|
||||
onCancel: () => void;
|
||||
onSubmit: (croppedArea: Area | undefined) => void;
|
||||
processing: boolean;
|
||||
aspect?: number;
|
||||
}): React.ReactElement {
|
||||
const [crop, setCrop] = React.useState({ x: 0, y: 0 });
|
||||
const [zoom, setZoom] = React.useState(1);
|
||||
@@ -34,7 +35,7 @@ export function ImageCropperDialog(p: {
|
||||
image={p.src}
|
||||
crop={crop}
|
||||
zoom={zoom}
|
||||
aspect={4 / 5}
|
||||
aspect={p.aspect}
|
||||
onCropChange={setCrop}
|
||||
onCropComplete={(_a, b) => setCroppedArea(b)}
|
||||
onZoomChange={setZoom}
|
||||
|
Reference in New Issue
Block a user