mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #4188 from overleaf/ae-memo
Improve React performance by memoizing components and values GitOrigin-RevId: 805278b8b7ac04c3dc4b078fa53cc0e3770d261b
This commit is contained in:
@@ -13,7 +13,7 @@ import withErrorBoundary from '../../../infrastructure/error-boundary'
|
||||
import { FetchError } from '../../../infrastructure/fetch-json'
|
||||
import { useChatContext } from '../context/chat-context'
|
||||
|
||||
function ChatPane() {
|
||||
const ChatPane = React.memo(function ChatPane() {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const { chatIsOpen } = useLayoutContext({ chatIsOpen: PropTypes.bool })
|
||||
@@ -81,7 +81,7 @@ function ChatPane() {
|
||||
/>
|
||||
</aside>
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
function LoadingSpinner() {
|
||||
const { t } = useTranslation()
|
||||
|
||||
Reference in New Issue
Block a user