Skip to content

Commit

Permalink
fix: react key warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wgwz committed Jul 25, 2023
1 parent 6cc02f1 commit 2f893fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/organisms/proposal-summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.bank.v1beta1.MsgSend':
return (
<SendReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -129,6 +130,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.staking.v1beta1.MsgDelegate':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -143,6 +145,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.staking.v1beta1.MsgBeginRedelegate':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -157,6 +160,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.staking.v1beta1.MsgUndelegate':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -171,6 +175,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -182,6 +187,6 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
/>
)
default:
return <JSONDisplay data={msg} />
return <JSONDisplay key={groupPolicyAddress} data={msg} />
}
}

0 comments on commit 2f893fd

Please sign in to comment.