Changeset View
Changeset View
Standalone View
Standalone View
web/chat/edit-message-provider.js
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | const value = React.useMemo( | ||||
], | ], | ||||
); | ); | ||||
const modalOverlay = React.useMemo(() => { | const modalOverlay = React.useMemo(() => { | ||||
if (!modal) { | if (!modal) { | ||||
return null; | return null; | ||||
} | } | ||||
return ( | return ( | ||||
<ModalOverlay onClose={clearEditModal} disableAutoFocus={true}> | <ModalOverlay | ||||
onClose={clearEditModal} | |||||
disableAutoFocus={true} | |||||
backgroundColor="var(--modal-overlay-background-80)" | |||||
> | |||||
{modal} | {modal} | ||||
</ModalOverlay> | </ModalOverlay> | ||||
); | ); | ||||
}, [clearEditModal, modal]); | }, [clearEditModal, modal]); | ||||
return ( | return ( | ||||
<EditModalContext.Provider value={value}> | <EditModalContext.Provider value={value}> | ||||
{children} | {children} | ||||
Show All 12 Lines |