Can download / delete member photo

This commit is contained in:
2023-08-10 13:53:23 +02:00
parent 1cf79e621f
commit 39c7163290
4 changed files with 67 additions and 14 deletions

View File

@ -2,10 +2,14 @@ import { PropsWithChildren } from "react";
import { Link } from "react-router-dom";
export function RouterLink(
p: PropsWithChildren<{ to: string }>
p: PropsWithChildren<{ to: string; target?: React.HTMLAttributeAnchorTarget }>
): React.ReactElement {
return (
<Link to={p.to} style={{ color: "inherit", textDecoration: "inherit" }}>
<Link
to={p.to}
target={p.target}
style={{ color: "inherit", textDecoration: "inherit" }}
>
{p.children}
</Link>
);

View File

@ -6,6 +6,7 @@ import { ImageCropperDialog } from "../../dialogs/ImageCropperDialog";
import { useAlert } from "../../hooks/context_providers/AlertDialogProvider";
import { Area } from "react-easy-crop";
import getCroppedImg from "../../utils/crop_image";
import UploadIcon from "@mui/icons-material/Upload";
export function UploadPhotoButton(p: {
label: string;
@ -82,7 +83,13 @@ export function UploadPhotoButton(p: {
return (
<>
{/* Upload button */}
<Button onClick={uploadPhoto}>{p.label}</Button>
<Button
onClick={uploadPhoto}
variant="outlined"
startIcon={<UploadIcon />}
>
{p.label}
</Button>
{/* Crop image dialog */}
{imageURL && (