Remove unnecessary keys

This commit is contained in:
moon 2022-04-15 06:55:15 -07:00
parent 51c6ee753c
commit a9f2322d8c
1 changed files with 13 additions and 40 deletions

View File

@ -63,16 +63,12 @@ function RestAPIFilters( {
return ( return (
<tr key={ index }> <tr key={ index }>
<td key={ 0 }>{ index + 1 }</td> <td>{ index + 1 }</td>
<td key={ 1 }>{ endpoint }</td> <td>{ endpoint }</td>
<td key={ 'optionValue' }>{ dotNotation }</td> <td key={ 'optionValue' }>{ dotNotation }</td>
<td className="align-center" key={ 2 }> <td className="align-center">{ replacement + '' }</td>
{ replacement + '' } <td className="align-center">{ enabled + '' }</td>
</td> <td className="align-center">
<td className="align-center" key={ 3 }>
{ enabled + '' }
</td>
<td className="align-center" key={ 4 }>
<button <button
className="button btn-primary" className="button btn-primary"
onClick={ () => toggleFilter( index ) } onClick={ () => toggleFilter( index ) }
@ -80,7 +76,7 @@ function RestAPIFilters( {
Toggle Toggle
</button> </button>
</td> </td>
<td className="align-center" key={ 5 }> <td className="align-center">
<button <button
className="button btn-danger" className="button btn-danger"
onClick={ () => deleteFilter( index ) } onClick={ () => deleteFilter( index ) }
@ -134,46 +130,23 @@ function RestAPIFilters( {
<table className="wp-list-table striped table-view-list widefat"> <table className="wp-list-table striped table-view-list widefat">
<thead> <thead>
<tr> <tr>
<td <td className="manage-column column-thumb">I.D</td>
className="manage-column column-thumb" <td className="manage-column column-thumb">
key={ 0 }
>
I.D
</td>
<td
className="manage-column column-thumb"
key={ 1 }
>
Endpoint Endpoint
</td> </td>
<td <td className="manage-column column-thumb">
className="manage-column column-thumb"
key={ 'optionValue' }
>
Dot Notation Dot Notation
</td> </td>
<td <td className="manage-column column-thumb align-center">
className="manage-column column-thumb align-center"
key={ 2 }
>
Replacement Replacement
</td> </td>
<td <td className="manage-column column-thumb align-center">
className="manage-column column-thumb align-center"
key={ 3 }
>
Enabled Enabled
</td> </td>
<td <td className="manage-column column-thumb align-center">
className="manage-column column-thumb align-center"
key={ 3 }
>
Toggle Toggle
</td> </td>
<td <td className="manage-column column-thumb align-center"></td>
className="manage-column column-thumb align-center"
key={ 4 }
></td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>