fix unique key prop error on forms
This commit is contained in:
@@ -39,7 +39,9 @@ export function ReportDeleteButton({
|
|||||||
<Modal title={formatMessage(labels.deleteReport)}>
|
<Modal title={formatMessage(labels.deleteReport)}>
|
||||||
{(close: () => void) => (
|
{(close: () => void) => (
|
||||||
<ConfirmationForm
|
<ConfirmationForm
|
||||||
message={formatMessage(messages.confirmDelete, { target: <b>{reportName}</b> })}
|
message={formatMessage(messages.confirmDelete, {
|
||||||
|
target: <b key={messages.confirmDelete.id}>{reportName}</b>,
|
||||||
|
})}
|
||||||
isLoading={isPending}
|
isLoading={isPending}
|
||||||
error={error}
|
error={error}
|
||||||
onConfirm={handleConfirm.bind(null, close)}
|
onConfirm={handleConfirm.bind(null, close)}
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ export function TeamLeaveForm({
|
|||||||
return (
|
return (
|
||||||
<ConfirmationForm
|
<ConfirmationForm
|
||||||
buttonLabel={formatMessage(labels.leave)}
|
buttonLabel={formatMessage(labels.leave)}
|
||||||
message={formatMessage(messages.confirmLeave, { target: <b>{teamName}</b> })}
|
message={formatMessage(messages.confirmLeave, {
|
||||||
|
target: <b key={messages.confirmLeave.id}>{teamName}</b>,
|
||||||
|
})}
|
||||||
onConfirm={handleConfirm}
|
onConfirm={handleConfirm}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
isLoading={isPending}
|
isLoading={isPending}
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ export function UserDeleteForm({ userId, username, onSave, onClose }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ConfirmationForm
|
<ConfirmationForm
|
||||||
message={formatMessage(messages.confirmDelete, { target: <b>{username}</b> })}
|
message={formatMessage(messages.confirmDelete, {
|
||||||
|
target: <b key={messages.confirmDelete.id}>{username}</b>,
|
||||||
|
})}
|
||||||
onConfirm={handleConfirm}
|
onConfirm={handleConfirm}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
buttonLabel={formatMessage(labels.delete)}
|
buttonLabel={formatMessage(labels.delete)}
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ export function TeamMemberRemoveButton({
|
|||||||
<Modal title={formatMessage(labels.removeMember)}>
|
<Modal title={formatMessage(labels.removeMember)}>
|
||||||
{(close: () => void) => (
|
{(close: () => void) => (
|
||||||
<ConfirmationForm
|
<ConfirmationForm
|
||||||
message={formatMessage(messages.confirmRemove, { target: <b>{userName}</b> })}
|
message={formatMessage(messages.confirmRemove, {
|
||||||
|
target: <b key={messages.confirmRemove.id}>{userName}</b>,
|
||||||
|
})}
|
||||||
isLoading={isPending}
|
isLoading={isPending}
|
||||||
error={error}
|
error={error}
|
||||||
onConfirm={handleConfirm.bind(null, close)}
|
onConfirm={handleConfirm.bind(null, close)}
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ export function TypeConfirmationForm({
|
|||||||
return (
|
return (
|
||||||
<Form onSubmit={onConfirm} error={error}>
|
<Form onSubmit={onConfirm} error={error}>
|
||||||
<p>
|
<p>
|
||||||
{formatMessage(messages.actionConfirmation, { confirmation: <b>{confirmationValue}</b> })}
|
{formatMessage(messages.actionConfirmation, {
|
||||||
|
confirmation: <b key={messages.actionConfirmation.id}>{confirmationValue}</b>,
|
||||||
|
})}
|
||||||
</p>
|
</p>
|
||||||
<FormRow label={formatMessage(labels.confirm)}>
|
<FormRow label={formatMessage(labels.confirm)}>
|
||||||
<FormInput name="confirm" rules={{ validate: value => value === confirmationValue }}>
|
<FormInput name="confirm" rules={{ validate: value => value === confirmationValue }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user