aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-26 17:27:59 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-26 17:27:59 -0700
commitec66ad6b53330c19399532268b8a65cc3e3ba240 (patch)
treeb14ef8e219a3adaf427cfd90b4a36167b3548ccb /modern
parent6c0eece6465ec148ecc5517cfea5522c27a9801f (diff)
downloadtrackermap-web-ec66ad6b53330c19399532268b8a65cc3e3ba240.tar.gz
trackermap-web-ec66ad6b53330c19399532268b8a65cc3e3ba240.tar.bz2
trackermap-web-ec66ad6b53330c19399532268b8a65cc3e3ba240.zip
Ignore lint for shimmer
Diffstat (limited to 'modern')
-rw-r--r--modern/src/common/components/TableShimmer.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/modern/src/common/components/TableShimmer.js b/modern/src/common/components/TableShimmer.js
index e7d12f95..3bccb22c 100644
--- a/modern/src/common/components/TableShimmer.js
+++ b/modern/src/common/components/TableShimmer.js
@@ -1,12 +1,13 @@
import React from 'react';
import { Skeleton, TableCell, TableRow } from '@mui/material';
-const TableShimmer = ({ columns, startAction, endAction }) => [...Array(3)].map(() => (
- <TableRow>
- {[...Array(columns)].map((_, i) => {
- const action = (startAction && i === 0) || (endAction && i === columns - 1);
+/* eslint-disable react/no-array-index-key */
+const TableShimmer = ({ columns, startAction, endAction }) => [...Array(3)].map((_, i) => (
+ <TableRow key={i}>
+ {[...Array(columns)].map((_, j) => {
+ const action = (startAction && j === 0) || (endAction && j === columns - 1);
return (
- <TableCell padding={action ? 'none' : 'normal'}>
+ <TableCell key={j} padding={action ? 'none' : 'normal'}>
{!action && <Skeleton />}
</TableCell>
);