Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show info on deleted message #3154

Merged
merged 3 commits into from
Mar 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions packages/chat-sdk/src/components/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import DoneIcon from "@mui/icons-material/Done";
import DoneAllIcon from "@mui/icons-material/DoneAll";
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
import VerifiedIcon from "@mui/icons-material/Verified";
import { Button, IconButton, Skeleton } from "@mui/material";
import { Button, IconButton, Skeleton, Tooltip } from "@mui/material";
import Info from "@mui/icons-material/Info";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import { createStyles, makeStyles } from "@mui/styles";
Expand Down Expand Up @@ -1146,6 +1147,7 @@ function DeleteIconInternal({
);
}


function DeletedMessage() {
const theme = useCustomTheme();
return (
Expand All @@ -1157,9 +1159,19 @@ function DeletedMessage() {
display: "inline-flex",
padding: "2px 6px",
marginLeft: -6,
alignItems: "center",
}}
>
Message removed
<span>Message removed</span>
<Tooltip title="This was probably a spam">
<Info
style={{
fontSize: "1rem",
marginLeft: 4,
color: theme.custom.colors.icon,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need background color?

}}
/>
</Tooltip>
</div>
);
}