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 0c61afd commit bf9a8b5
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 @@ -111,6 +111,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.bank.v1beta1.MsgSend':
return (
<SendReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -126,6 +127,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.staking.v1beta1.MsgDelegate':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -140,6 +142,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.staking.v1beta1.MsgBeginRedelegate':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -154,6 +157,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.staking.v1beta1.MsgUndelegate':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -168,6 +172,7 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
case '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward':
return (
<StakeReview
key={groupPolicyAddress}
groupPolicyAddress={groupPolicyAddress}
values={
{
Expand All @@ -179,6 +184,6 @@ function renderMessage(msg: any, groupPolicyAddress: string) {
/>
)
default:
return <JSONDisplay data={msg} />
return <JSONDisplay key={groupPolicyAddress} data={msg} />
}
}

0 comments on commit bf9a8b5

Please sign in to comment.