Selaa lähdekoodia

fix: hide context bar actions

Konstantinos Kaloutas 2 vuotta sitten
vanhempi
sitoutus
4330f92746

+ 3 - 0
tldraw/apps/tldraw-logseq/src/components/ContextBar/contextBarActionFactory.tsx

@@ -566,6 +566,9 @@ const getContextBarActionTypes = (type: ShapeType) => {
 }
 
 export const getContextBarActionsForShapes = (shapes: Shape[]) => {
+  const {isPublishing} = React.useContext(LogseqContext)
+  if (isPublishing) return []
+
   const types = shapes.map(s => s.props.type)
   const actionTypes = new Set(shapes.length > 0 ? getContextBarActionTypes(types[0]) : [])
   for (let i = 1; i < types.length && actionTypes.size > 0; i++) {