Skip to content
Snippets Groups Projects
Commit 717b9fd1 authored by Max Frederiksen's avatar Max Frederiksen
Browse files

Remove any use of index

parent 4ab300a5
No related branches found
No related tags found
2 merge requests!542Prepare 4.1.0,!523CE-2952: Addressing security hotspots and code smells (sonarqube)
Pipeline #195620 failed
......@@ -34,10 +34,10 @@ export const StatusPopoverContent = ({ title, alerts }) => {
{title}
</Typography>
{sanitizedAlerts.length > 0
? sanitizedAlerts.map((alert, index) => (
? sanitizedAlerts.map((alert) => (
<AlertBanner
{...alert}
key={`${alert?.type}-${alert?.message}-${index}`}
key={`${alert?.type}-${alert?.message}-${alert?.link}`}
/>
))
: null}
......
......@@ -58,8 +58,8 @@ function MenuListItem({ url, icon, text, tooltip }) {
function MenuListItems({ menuItems, drawerOpen }) {
return (
<Box sx={{ paddingTop: 3 }}>
{menuItems.map(({ text, url, icon }, index) => (
<Fragment key={`${text}-${index}`}>
{menuItems.map(({ text, url, icon }) => (
<Fragment key={`${text}-${url}-${icon}`}>
{typeof (text && url && icon) === "undefined" ? (
<Divider sx={{ marginTop: 5 }} />
) : (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment