浏览代码

chore: Add Default value

MystiPanda 1 年之前
父节点
当前提交
8ec19e058f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/layout/layout-item.tsx

+ 1 - 1
src/components/layout/layout-item.tsx

@@ -15,7 +15,7 @@ interface Props {
 export const LayoutItem = (props: Props) => {
   const { to, children, icon } = props;
   const { verge } = useVerge();
-  const { menu_icon } = verge ?? {};
+  const { menu_icon = "monochrome" } = verge ?? {};
   const resolved = useResolvedPath(to);
   const match = useMatch({ path: resolved.pathname, end: true });
   const navigate = useNavigate();