import { createErrorBlock } from "antd-mobile";
import { emptyImage } from 'antd-mobile/es/components/error-block/images';

export const ErrorBlock = createErrorBlock({
  'empty': emptyImage,
})

export const getContentText = (content) => {
  var text = content.replace(/<[^<>]+>/g, "").replace(/&nbsp;/g, "");
  return text
}

export const menuItems = [
  {
    label: (
      <a href="/home">
        首页
      </a>
    ),
    key: "/home",
  },
  {
    label: (
      <a href="/desc">
        集团简介
      </a>
    ),
    key: "/desc",
  },
  {
    label: (
      <a href="/news">
        兴嘉要闻
      </a>
    ),
    key: "/news",
  },
  {
    label: (
      <a href="/notices">
        公示公告
      </a>
    ),
    key: "/notices",
  },
  {
    label: (
      <a href="/project">
        项目展示
      </a>
    ),
    key: "/project",
  },
  {
    label: "兴嘉建党",
    key: "/party",
    children: [
      {
        label: (
          <a href="/party/hwdt">
            会务动态
          </a>
        ),
        key: "/party/hwdt",
      },
      {
        label: (
          <a href="/party/lxyz">
            两学一做
          </a>
        ),
        key: "/party/lxyz",
      },
      {
        label: (
          <a href="/party/dflj">
            党风廉洁
          </a>
        ),
        key: "/party/dflj"
      }
    ]
  },
];