Skip to content

Commit

Permalink
chore(fix-lint): list should have unique "key" prop
Browse files Browse the repository at this point in the history
  • Loading branch information
pongstr committed Dec 21, 2024
1 parent c5d9fc6 commit ff4a505
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/behaviors/ParameterValuePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ export const ParameterValuePicker = ({
className="h-8 rounded"
onChange={(e) => onValueChanged(parseInt(e.target.value))}
>
{values.map((v) => (
<option value={v.constant}>{v.name}</option>
{values.map((v, i) => (
<option key={i} value={v.constant}>
{v.name}
</option>
))}
</select>
</div>
Expand Down Expand Up @@ -66,7 +68,9 @@ export const ParameterValuePicker = ({
onChange={(e) => onValueChanged(parseInt(e.target.value))}
>
{layers.map(({ name, id }) => (
<option value={id}>{name}</option>
<option key={id} value={id}>
{name}
</option>
))}
</select>
</div>
Expand Down

0 comments on commit ff4a505

Please sign in to comment.