mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #4230 from overleaf/msm-prevent-chat-render
Prevent chat-pane from being rendered when user is not defined GitOrigin-RevId: d044c5d9dc7f07fa535bed746b46a6cff1f78dff
This commit is contained in:
@@ -18,7 +18,7 @@ const ChatPane = React.memo(function ChatPane() {
|
||||
|
||||
const { chatIsOpen } = useLayoutContext({ chatIsOpen: PropTypes.bool })
|
||||
const { user } = useApplicationContext({
|
||||
user: PropTypes.shape({ id: PropTypes.string.isRequired }.isRequired),
|
||||
user: PropTypes.shape({ id: PropTypes.string.isRequired }),
|
||||
})
|
||||
|
||||
const {
|
||||
@@ -55,6 +55,10 @@ const ChatPane = React.memo(function ChatPane() {
|
||||
throw error
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<aside className="chat">
|
||||
<InfiniteScroll
|
||||
|
||||
Reference in New Issue
Block a user