diff --git a/components/Collaborate/CollabEditor.js b/components/Collaborate/CollabEditor.js index b1b69671..d9de481b 100644 --- a/components/Collaborate/CollabEditor.js +++ b/components/Collaborate/CollabEditor.js @@ -20,6 +20,7 @@ import useCurrentUser from 'lib/useCurrentUser'; import PlaceholderPlugin from './Placeholder'; import getConfig from 'next/config'; import CollabHistory from './CollabHistory'; +import { useIsUserBlocked } from 'lib/isUserBlocked'; const { publicRuntimeConfig: { PUBLIC_COLLAB_SERVER_URL }, @@ -139,6 +140,7 @@ const CollabEditor = ({ article }) => { const [showEditor, setShowEditor] = useState(null); const [isSynced, setIsSynced] = useState(false); const currentUser = useCurrentUser(); + const isUserBlocked = useIsUserBlocked(); // onTranscribe setup provider for both Editor and CollabHistory to use. // And, to avoid duplicated connection, provider will be destroyed(close connection) when Editor unmounted. @@ -208,7 +210,7 @@ const CollabEditor = ({ article }) => { > {t`No transcripts yet`} - {!showEditor ? ( + {!showEditor && !isUserBlocked ? ( <> - ) : ( - isSynced && ( - - ) - )} + {!showEditor + ? !isUserBlocked && ( + + ) + : isSynced && ( + + )} )}