feat: add report button to user profiles

This commit is contained in:
Paul Makles 2024-06-23 12:23:42 +01:00
parent 2722d0a854
commit 0f0808aa56
No known key found for this signature in database
GPG key ID: 5059F398521BB0F6

View file

@ -6,6 +6,7 @@ import {
UserX,
Group,
InfoCircle,
Flag,
} from "@styled-icons/boxicons-solid";
import { observer } from "mobx-react-lite";
import { Link, useHistory } from "react-router-dom";
@ -246,6 +247,24 @@ export const UserProfile = observer(
<UserX size={28} />
</IconButton>
)}
{!user.bot && flags != 2 && flags != 4 && (
<Localizer>
<Tooltip
content={
<Text id="app.context_menu.report_user" />
}>
<IconButton
onClick={() =>
modalController.push({
type: "report",
target: user,
})
}>
<Flag size={28} />
</IconButton>
</Tooltip>
</Localizer>
)}
</div>
{badges > 0 && (
<div