Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1830337: Fix masthead toolbar warnings #5262

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions frontend/public/components/masthead-toolbar.jsx
Expand Up @@ -346,15 +346,15 @@ class MastheadToolbarContents_ extends React.Component {
action.externalLink ? { isExternal: true, target: '_blank', rel: 'noopener noreferrer' } : {};

_renderApplicationItems(actions) {
return _.map(actions, (action, index) => {
return _.map(actions, (action, groupIndex) => {
if (action.isSection) {
return (
<ApplicationLauncherGroup key={`group_${index}`} label={action.name}>
<ApplicationLauncherGroup key={groupIndex} label={action.name}>
<>
{_.map(action.actions, (sectionAction) => {
{_.map(action.actions, (sectionAction, itemIndex) => {
return (
<ApplicationLauncherItem
key={sectionAction.label}
key={itemIndex}
icon={sectionAction.image}
href={sectionAction.href || '#'}
onClick={sectionAction.callback}
Expand All @@ -365,16 +365,16 @@ class MastheadToolbarContents_ extends React.Component {
</ApplicationLauncherItem>
);
})}
{index < actions.length - 1 && (
<ApplicationLauncherSeparator key={`separator-${index}`} />
{groupIndex < actions.length - 1 && (
<ApplicationLauncherSeparator key={`separator-${groupIndex}`} />
)}
</>
</ApplicationLauncherGroup>
);
}

return (
<ApplicationLauncherGroup key={`group_${index}`}>
<ApplicationLauncherGroup key={groupIndex}>
<>
<ApplicationLauncherItem
key={action.label}
Expand All @@ -386,8 +386,8 @@ class MastheadToolbarContents_ extends React.Component {
>
{action.label}
</ApplicationLauncherItem>
{index < actions.length - 1 && (
<ApplicationLauncherSeparator key={`separator-${index}`} />
{groupIndex < actions.length - 1 && (
<ApplicationLauncherSeparator key={`separator-${groupIndex}`} />
)}
</>
</ApplicationLauncherGroup>
Expand Down Expand Up @@ -567,7 +567,7 @@ class MastheadToolbarContents_ extends React.Component {
<Link
to={this._getImportYAMLPath()}
className="pf-c-button pf-m-plain"
aria-lable="Import YAML"
aria-label="Import YAML"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typing is hard. ;-)

>
<PlusCircleIcon className="co-masthead-icon" />
</Link>
Expand Down