diff --git a/client/ui/app-state/AppStateContextWrapper.tsx b/client/ui/app-state/AppStateContextWrapper.tsx index accbd98..cc35c56 100644 --- a/client/ui/app-state/AppStateContextWrapper.tsx +++ b/client/ui/app-state/AppStateContextWrapper.tsx @@ -84,7 +84,7 @@ export default function DialogContextWrapper({ children, useRef }: { children: R setCurrentSelectedChatId('') } }}> - {} + diff --git a/client/ui/chat-fragment/ChatFragment.tsx b/client/ui/chat-fragment/ChatFragment.tsx index c1d6692..b99fab4 100644 --- a/client/ui/chat-fragment/ChatFragment.tsx +++ b/client/ui/chat-fragment/ChatFragment.tsx @@ -77,13 +77,13 @@ export default function ChatFragment({ display: "flex", flexDirection: "column", }}> - {/* { + { openedInDialog && AppState.closeChat()} style={{ alignSelf: 'center', marginLeft: '5px', marginRight: '5px', }}> - } */} + } + { + /* { window.open('/chat?id=' + chatInfo.getId(), '_blank') }} style={{ @@ -112,6 +114,8 @@ export default function ChatFragment({ marginLeft: '5px', marginRight: '5px', }}> + */ + } { }} style={{ diff --git a/client/ui/chat-fragment/ChatMessage.tsx b/client/ui/chat-fragment/ChatMessage.tsx index 72cfae0..c4d9104 100644 --- a/client/ui/chat-fragment/ChatMessage.tsx +++ b/client/ui/chat-fragment/ChatMessage.tsx @@ -170,10 +170,9 @@ export default function ChatMessage({ message, noUserDisplay, avatarMenuItems, m flexDirection: "column" }}> { - !noUserDisplay && -
{ diff --git a/client/utils/useEventListener.ts b/client/utils/useEventListener.ts index 54e0ff5..c8770f8 100644 --- a/client/utils/useEventListener.ts +++ b/client/utils/useEventListener.ts @@ -1,7 +1,9 @@ import * as React from 'react' export default function useEventListener(ref: React.MutableRefObject, eventName: string, callback: (event: Event) => void) { + // console.error(ref, eventName, callback) React.useEffect(() => { + // console.warn(ref, eventName, callback) ref.current!.addEventListener(eventName, callback) return () => ref.current?.removeEventListener(eventName, callback) }, [ref, eventName, callback])