Can download / delete member photo
This commit is contained in:
@ -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>
|
||||
);
|
||||
|
@ -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 && (
|
||||
|
Reference in New Issue
Block a user