diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-26 17:29:53 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-26 17:29:53 -0700 |
commit | 2ddcfc41e2ee4a25e8ea95a470b0d7ea8847f1cf (patch) | |
tree | c89e8e84ad90c9e20c06e460d292205b8ab94f2e /modern/src/common | |
parent | ec66ad6b53330c19399532268b8a65cc3e3ba240 (diff) | |
download | trackermap-web-2ddcfc41e2ee4a25e8ea95a470b0d7ea8847f1cf.tar.gz trackermap-web-2ddcfc41e2ee4a25e8ea95a470b0d7ea8847f1cf.tar.bz2 trackermap-web-2ddcfc41e2ee4a25e8ea95a470b0d7ea8847f1cf.zip |
Better shimmer lint fix
Diffstat (limited to 'modern/src/common')
-rw-r--r-- | modern/src/common/components/TableShimmer.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modern/src/common/components/TableShimmer.js b/modern/src/common/components/TableShimmer.js index 3bccb22c..08a984a4 100644 --- a/modern/src/common/components/TableShimmer.js +++ b/modern/src/common/components/TableShimmer.js @@ -1,13 +1,12 @@ import React from 'react'; import { Skeleton, TableCell, TableRow } from '@mui/material'; -/* eslint-disable react/no-array-index-key */ const TableShimmer = ({ columns, startAction, endAction }) => [...Array(3)].map((_, i) => ( - <TableRow key={i}> + <TableRow key={-i}> {[...Array(columns)].map((_, j) => { const action = (startAction && j === 0) || (endAction && j === columns - 1); return ( - <TableCell key={j} padding={action ? 'none' : 'normal'}> + <TableCell key={-j} padding={action ? 'none' : 'normal'}> {!action && <Skeleton />} </TableCell> ); |