mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-21 22:50:59 -05:00
feat: add report button to user profiles
This commit is contained in:
parent
2722d0a854
commit
0f0808aa56
1 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue