File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ export default function CollabSidebar() {
6262 } ;
6363 } , [ ] ) ;
6464
65+ const postStatus = useSelect ( ( select ) => {
66+ const post = select ( editorStore ) . getCurrentPost ( ) ;
67+ return { postStatus : post ?. status } ;
68+ } , [ ] ) ;
69+
6570 const threads = useSelect (
6671 ( select ) => {
6772 if ( ! postId ) {
@@ -259,7 +264,10 @@ export default function CollabSidebar() {
259264 } , [ postId , clientId ] ) ;
260265
261266 // Check if the experimental flag is enabled.
262- if ( ! isBlockCommentExperimentEnabled ) {
267+ if (
268+ ! isBlockCommentExperimentEnabled ||
269+ postStatus . postStatus === 'publish'
270+ ) {
263271 return null ; // or maybe return some message indicating no threads are available.
264272 }
265273
You can’t perform that action at this time.
0 commit comments