From 0a944720fecb3a2fdfdc483449c5ab0e58df7c02 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Thu, 18 Mar 2021 21:48:46 +0800
Subject: fix: Fix a list with no key.

---
 FrontEnd/src/app/views/common/Menu.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'FrontEnd/src/app/views/common/Menu.tsx')

diff --git a/FrontEnd/src/app/views/common/Menu.tsx b/FrontEnd/src/app/views/common/Menu.tsx
index 54650f22..d942d452 100644
--- a/FrontEnd/src/app/views/common/Menu.tsx
+++ b/FrontEnd/src/app/views/common/Menu.tsx
@@ -30,12 +30,13 @@ const Menu: React.FC<MenuProps> = ({ items, className, onItemClicked }) => {
 
   return (
     <div className={clsx("cru-menu", className)}>
-      {items.map((item) => {
+      {items.map((item, index) => {
         if (item.type === "divider") {
-          return <div className="cru-menu-divider" />;
+          return <div key={index} className="cru-menu-divider" />;
         } else {
           return (
             <div
+              key={index}
               className={clsx(
                 "cru-menu-item",
                 `color-${item.color ?? "primary"}`
-- 
cgit v1.2.3

