Explorar o código

Fix jsx key issue

nimbleghost %!s(int64=2) %!d(string=hai) anos
pai
achega
7ccc5be9b4
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      web/src/components/PublishDialog.jsx

+ 2 - 4
web/src/components/PublishDialog.jsx

@@ -467,10 +467,8 @@ const PublishDialog = (props) => {
                     "aria-label": t("publish_dialog_call_label"),
                   }}
                 >
-                  {account?.phone_numbers?.map((phoneNumber, i) => (
-                    // TODO(eslint): Possibly just use the phone number as a key?
-                    // eslint-disable-next-line react/no-array-index-key
-                    <MenuItem key={`phoneNumberMenuItem${i}`} value={phoneNumber} aria-label={phoneNumber}>
+                  {account?.phone_numbers?.map((phoneNumber) => (
+                    <MenuItem key={phoneNumber} value={phoneNumber} aria-label={phoneNumber}>
                       {t("publish_dialog_call_item", { number: phoneNumber })}
                     </MenuItem>
                   ))}