Skip to content

Commit

Permalink
feat: add report button to user profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed Jun 23, 2024
1 parent 2722d0a commit 0f0808a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/controllers/modals/components/legacy/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0f0808a

Please sign in to comment.