mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Fix the structure
This commit is contained in:
@@ -6,15 +6,16 @@ import type { UserProfile } from "../../../core/types";
|
||||
import { UserProfileDialog } from "./UserProfileDialog";
|
||||
import { MessageContextMenu, type ContextMenuState } from "./MessageContextMenu";
|
||||
import { fetchUserProfile } from "../../api/profileApi";
|
||||
import { useState } from "react";
|
||||
import { useState, type ReactNode } from "react";
|
||||
import { delay } from "../../../utils/utils";
|
||||
import { request } from "../../../websocket";
|
||||
|
||||
interface ChatMessagesProps {
|
||||
messages?: MessageType[];
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export function ChatMessages({ messages: propMessages }: ChatMessagesProps) {
|
||||
export function ChatMessages({ messages: propMessages, children }: ChatMessagesProps) {
|
||||
const { messages: hookMessages } = useChat();
|
||||
const { user } = useAppState();
|
||||
|
||||
@@ -137,6 +138,7 @@ export function ChatMessages({ messages: propMessages }: ChatMessagesProps) {
|
||||
isLoadingProfile={isLoadingProfile}
|
||||
/>
|
||||
))}
|
||||
{children}
|
||||
</div>
|
||||
|
||||
<UserProfileDialog
|
||||
|
||||
Reference in New Issue
Block a user