Skip to content

Commit

Permalink
fix(instance) ensure bulk actions have a key prop
Browse files Browse the repository at this point in the history
  • Loading branch information
edlerd committed May 25, 2023
1 parent 31bd84e commit 8469384
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/instances/actions/InstanceBulkAction.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FC, ReactNode } from "react";
import React, { FC, Fragment, ReactNode } from "react";
import ConfirmationButton from "components/ConfirmationButton";
import {
LxdInstance,
Expand Down Expand Up @@ -70,24 +70,24 @@ const InstanceBulkAction: FC<Props> = ({
const instance = count === 1 ? "instance that is" : "instances that are";
const already = desiredAction !== "restart" ? "already " : "";
return (
<>
<Fragment key={currentState + desiredAction}>
- No action for <b>{count}</b> {instance} {already}
{currentState.toLowerCase().replace("frozen", "paused")}.
<br />
</>
</Fragment>
);
}

const indent = hasDifferentStates ? "- " : "";
const action = instanceActionLabel(actionRaw);

return (
<>
<Fragment key={currentState + desiredAction}>
{indent}
<b>{count}</b>
{` ${status} ${pluralizeInstance(count)} will be ${action}.`}
<br />
</>
</Fragment>
);
};

Expand Down

0 comments on commit 8469384

Please sign in to comment.