mirror of https://github.com/logseq/logseq
fix: hide context bar actions
parent
0a1f5e059c
commit
4330f92746
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue