Skip to content

Commit

Permalink
no index as key
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Dec 11, 2023
1 parent 0827c90 commit 697b277
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions ui/app/mirrors/create/cdc/schemabox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ const SchemaBox = ({
row.schema === schema &&
row.source.toLowerCase().includes(tableQuery.toLowerCase())
)
.map((row, index) => {
.map((row) => {
const columns = getTableColumns(row.source);
return (
<div key={index} style={tableBoxStyle}>
<div key={row.source} style={tableBoxStyle}>
<div
style={{
display: 'flex',
Expand Down Expand Up @@ -222,6 +222,7 @@ const SchemaBox = ({
style={{
fontSize: 12,
marginTop: '0.5rem',
cursor: 'pointer'
}}
variant='simple'
placeholder={'Enter target table'}
Expand All @@ -242,13 +243,13 @@ const SchemaBox = ({
Columns
</Label>
{columns ? (
columns.map((column, index) => {
columns.map((column) => {
const columnName = column.split(':')[0];
const columnType = column.split(':')[1];
const isPkey = column.split(':')[2] === 'true';
return (
<RowWithCheckbox
key={index}
key={column}
label={
<Label
as='label'
Expand All @@ -257,7 +258,7 @@ const SchemaBox = ({
display: 'flex',
}}
>
{columnName}{' '}
{columnName}
<p
style={{
marginLeft: '0.5rem',
Expand Down
4 changes: 2 additions & 2 deletions ui/app/mirrors/create/cdc/tablemapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ const TableMapping = ({
?.filter((schema) => {
return schema.toLowerCase().includes(schemaQuery.toLowerCase());
})
.map((schema, index) => (
.map((schema) => (
<SchemaBox
key={index}
key={schema}
schema={schema}
sourcePeer={sourcePeerName}
rows={rows}
Expand Down

0 comments on commit 697b277

Please sign in to comment.