From 939e18624af4252551f38c43335ee8ef0acd144c Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sun, 21 Apr 2024 19:03:49 -0400
Subject: more lint cleanup

---
 src/client/views/UndoStack.tsx | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

(limited to 'src/client/views/UndoStack.tsx')

diff --git a/src/client/views/UndoStack.tsx b/src/client/views/UndoStack.tsx
index 068143225..2d461c0ab 100644
--- a/src/client/views/UndoStack.tsx
+++ b/src/client/views/UndoStack.tsx
@@ -1,6 +1,7 @@
+/* eslint-disable jsx-a11y/no-static-element-interactions */
+/* eslint-disable jsx-a11y/click-events-have-key-events */
 import { Tooltip } from '@mui/material';
 import { Popup, Type } from 'browndash-components';
-import { observable } from 'mobx';
 import { observer } from 'mobx-react';
 import * as React from 'react';
 import { StrCast } from '../../fields/Types';
@@ -15,19 +16,19 @@ export class UndoStack extends React.Component<UndoStackProps> {
         const background = UndoManager.batchCounter.get() ? 'yellow' : SettingsManager.userVariantColor;
         const color = UndoManager.batchCounter.get() ? 'black' : SettingsManager.userColor;
         return (
-            <Tooltip title={'undo stack (if it stays yellow, undo is broken - you should reload Dash)'}>
+            <Tooltip title="undo stack (if it stays yellow, undo is broken - you should reload Dash)">
                 <div>
                     <div className="undoStack-outerContainer">
                         <Popup
                             text="stack"
                             color={color}
                             background={background}
-                            placement={`top-start`}
+                            placement="top-start"
                             type={Type.TERT}
                             popup={
                                 <div
                                     className="undoStack-commandsContainer"
-                                    ref={r => r?.scroll({ behavior: 'auto', top: r?.scrollHeight + 20 })}
+                                    ref={r => r?.scroll({ behavior: 'auto', top: (r?.scrollHeight ?? 0) + 20 })}
                                     style={{
                                         background,
                                         color,
@@ -35,12 +36,13 @@ export class UndoStack extends React.Component<UndoStackProps> {
                                     {Array.from(UndoManager.undoStackNames).map((name, i) => (
                                         <div
                                             className="undoStack-resultContainer"
+                                            // eslint-disable-next-line react/no-array-index-key
                                             key={i}
-                                            onClick={e => {
+                                            onClick={() => {
                                                 const size = UndoManager.undoStackNames.length;
                                                 for (let n = 0; n < size - i; n++) UndoManager.Undo();
                                             }}>
-                                            <div className="undoStack-commandString">{StrCast(name).replace(/[^\.]*\./, '')}</div>
+                                            <div className="undoStack-commandString">{StrCast(name).replace(/[^.]*\./, '')}</div>
                                         </div>
                                     ))}
                                     {Array.from(UndoManager.redoStackNames)
@@ -48,12 +50,13 @@ export class UndoStack extends React.Component<UndoStackProps> {
                                         .map((name, i) => (
                                             <div
                                                 className="undoStack-resultContainer"
+                                                // eslint-disable-next-line react/no-array-index-key
                                                 key={i}
-                                                onClick={e => {
+                                                onClick={() => {
                                                     for (let n = 0; n <= i; n++) UndoManager.Redo();
                                                 }}>
                                                 <div className="undoStack-commandString" style={{ fontWeight: 'bold', background: SettingsManager.userBackgroundColor, color: SettingsManager.userColor }}>
-                                                    {StrCast(name).replace(/[^\.]*\./, '')}
+                                                    {StrCast(name).replace(/[^.]*\./, '')}
                                                 </div>
                                             </div>
                                         ))}
-- 
cgit v1.2.3-70-g09d2

