fix: remove special menu
This commit is contained in:
@@ -39,14 +39,6 @@ type MenuItemsProps = {
|
|||||||
|
|
||||||
export const CommonList = (props: MenuItemsProps) => {
|
export const CommonList = (props: MenuItemsProps) => {
|
||||||
const { items, currentItem, setCurrentItem, onSelected } = props;
|
const { items, currentItem, setCurrentItem, onSelected } = props;
|
||||||
// const JSONUnsupportedBlockTypes = useFlag('JSONUnsupportedBlockTypes', [
|
|
||||||
// 'page',
|
|
||||||
// ]);
|
|
||||||
// TODO Insert bidirectional link to be developed
|
|
||||||
const JSONUnsupportedBlockTypes = ['page'];
|
|
||||||
const usedItems = items.filter(item => {
|
|
||||||
return !JSONUnsupportedBlockTypes.includes(item?.content?.id);
|
|
||||||
});
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx(styles('root_container'), props.className)}>
|
<div className={clsx(styles('root_container'), props.className)}>
|
||||||
<div
|
<div
|
||||||
@@ -55,8 +47,8 @@ export const CommonList = (props: MenuItemsProps) => {
|
|||||||
commonListContainer,
|
commonListContainer,
|
||||||
])}
|
])}
|
||||||
>
|
>
|
||||||
{usedItems?.length ? (
|
{items?.length ? (
|
||||||
usedItems.map((item, idx) => {
|
items.map((item, idx) => {
|
||||||
if (item.renderCustom) {
|
if (item.renderCustom) {
|
||||||
return item.renderCustom(item);
|
return item.renderCustom(item);
|
||||||
} else if (item.block) {
|
} else if (item.block) {
|
||||||
|
|||||||
@@ -68,11 +68,12 @@ export const menuItemsMap: {
|
|||||||
type: Protocol.Block.Type.text,
|
type: Protocol.Block.Type.text,
|
||||||
icon: TextIcon,
|
icon: TextIcon,
|
||||||
},
|
},
|
||||||
{
|
// the Page block should not be inserted
|
||||||
text: 'Page',
|
// {
|
||||||
type: 'page',
|
// text: 'Page',
|
||||||
icon: PagesIcon,
|
// type: Protocol.Block.Type.page,
|
||||||
},
|
// icon: PagesIcon,
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
text: 'Heading 1',
|
text: 'Heading 1',
|
||||||
type: Protocol.Block.Type.heading1,
|
type: Protocol.Block.Type.heading1,
|
||||||
|
|||||||
Reference in New Issue
Block a user