mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the following SonarQube code smells:
1) Do not use the Array index in keys. 2) Import from the same module should be merged. 3) Mutable variables should not be exported. 4) Variables should not be initialized to undefined. 5) startswith or endswith method should be used. 6) Unwrap this unnecessarily grouped subpattern. Additionally, addressed many other SonarQube rules.
This commit is contained in:
@@ -106,14 +106,14 @@ const DiskStatsTable = (props) => {
|
||||
<Table classNameRoot='Storage-tableWhiteSpace'>
|
||||
<thead>
|
||||
<tr>
|
||||
{tableHeader.map((item, index) => (
|
||||
<th key={index}>{item.header}</th>
|
||||
{tableHeader.map((item) => (
|
||||
<th key={item.header}>{item.header}</th>
|
||||
))}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data.map((item, index) => (
|
||||
<tr key={index}>
|
||||
{data.map((item) => (
|
||||
<tr key={item.file_system_type + item.mount_point}>
|
||||
{tableHeader.map((header, id) => (
|
||||
<td key={header.accessorKey+'-'+id}>{item[header.accessorKey]}</td>
|
||||
))}
|
||||
|
||||
@@ -54,8 +54,8 @@ const SummaryTable = (props) => {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data.map((item, index) => (
|
||||
<tr key={index}>
|
||||
{data.map((item) => (
|
||||
<tr key={item.name}>
|
||||
<td>{item.name}</td>
|
||||
<td>{item.value}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user