feat: implement user reporting functionality with a dedicated modal and service, integrated into the chat header.

This commit is contained in:
pradeepkumar
2026-03-19 05:24:41 +05:30
parent 776aeaac8d
commit 3a5377dd35
4 changed files with 210 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ interface ChatHeaderProps {
typingText?: string;
onClearChat?: () => void;
onDeleteConversation?: () => void;
onReportUser?: () => void;
}
export function ChatHeader({
@@ -30,6 +31,7 @@ export function ChatHeader({
typingText,
onClearChat,
onDeleteConversation,
onReportUser,
}: ChatHeaderProps) {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [isMuted, setIsMuted] = useState(false);
@@ -49,9 +51,7 @@ export function ChatHeader({
},
{
label: 'Report User',
onClick: () => {
// Placeholder — no backend endpoint yet
},
onClick: () => onReportUser?.(),
},
{
label: 'Delete Conversation',