Skip to content

Commit

Permalink
chore: Fix duplicate key in model table.
Browse files Browse the repository at this point in the history
  • Loading branch information
mheggelund committed Oct 10, 2024
1 parent 5dc5de0 commit 2bf96a9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/features/ModelTable/ModelTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ export const ModelTable = () => {
cell: ({ row }) => (
<Styled.List>
{row.original.stratigraphicGroups.map((i) => (
<p key={i.country.countryId}>{i.country.identifier}, </p>
<p key={i.country.countryId + i.stratigraphicGroupId}>
{i.country.identifier},{' '}
</p>
))}
</Styled.List>
),
Expand All @@ -129,7 +131,9 @@ export const ModelTable = () => {
cell: ({ row }) => (
<Styled.List>
{row.original.stratigraphicGroups.map((i) => (
<p key={i.field.fieldId}>{i.field.identifier}, </p>
<p key={i.field.fieldId + i.stratigraphicGroupId}>
{i.field.identifier},{' '}
</p>
))}
</Styled.List>
),
Expand All @@ -142,7 +146,7 @@ export const ModelTable = () => {
cell: ({ row }) => (
<Styled.List>
{row.original.stratigraphicGroups.map((i) => (
<p key={i.stratColumn.stratColumnId}>
<p key={i.stratColumn.stratColumnId + i.stratigraphicGroupId}>
{i.stratColumn.identifier},{' '}
</p>
))}
Expand All @@ -157,7 +161,7 @@ export const ModelTable = () => {
cell: ({ row }) => (
<Styled.List>
{getRowGroup(row.original.stratigraphicGroups).map((i) => (
<p key={i.stratUnitId}>{i.identifier}, </p>
<p key={i.stratUnitId + i.identifier}>{i.identifier}, </p>
))}
</Styled.List>
),
Expand Down

0 comments on commit 2bf96a9

Please sign in to comment.