From ac8f8b5fb53612d1cdabd2d578252ca4e888e8bf Mon Sep 17 00:00:00 2001
From: Anthony Geourjon <anthony.geourjon@tetras-libre.fr>
Date: Mon, 12 Feb 2024 16:07:32 +0100
Subject: [PATCH] Fix linter error and warning

---
 __tests__/src/components/WindowSideBarAnnotationsPanel.test.js | 2 +-
 src/components/AnnotationManifestsAccordion.js                 | 2 +-
 src/components/ScrollIndicatedDialogContent.js                 | 2 +-
 src/components/WindowSideBarAnnotationsPanel.js                | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/__tests__/src/components/WindowSideBarAnnotationsPanel.test.js b/__tests__/src/components/WindowSideBarAnnotationsPanel.test.js
index 6faa978d6..811a8dbb9 100644
--- a/__tests__/src/components/WindowSideBarAnnotationsPanel.test.js
+++ b/__tests__/src/components/WindowSideBarAnnotationsPanel.test.js
@@ -2,7 +2,7 @@ import { render, screen } from 'test-utils';
 import i18next from 'i18next';
 
 import CanvasAnnotations from '../../../src/containers/CanvasAnnotations';
-import { WindowSideBarAnnotationsPanel } from '../../../src/components/WindowSideBarAnnotationsPanel';
+import WindowSideBarAnnotationsPanel from '../../../src/components/WindowSideBarAnnotationsPanel';
 
 /** */
 function createWrapper(props, state) {
diff --git a/src/components/AnnotationManifestsAccordion.js b/src/components/AnnotationManifestsAccordion.js
index 31f3eb744..8e6845ad1 100644
--- a/src/components/AnnotationManifestsAccordion.js
+++ b/src/components/AnnotationManifestsAccordion.js
@@ -46,7 +46,7 @@ export class AnnotationManifestsAccordion extends Component {
     const { annotation } = this.state;
     annotation.manifestsOpen = true;
     e.stopPropagation();
-    this.state = { annotation };
+    this.setState({ annotation });
   }
 
   /** */
diff --git a/src/components/ScrollIndicatedDialogContent.js b/src/components/ScrollIndicatedDialogContent.js
index 01e10ca25..388a0b861 100644
--- a/src/components/ScrollIndicatedDialogContent.js
+++ b/src/components/ScrollIndicatedDialogContent.js
@@ -16,7 +16,7 @@ const getOverlayAlpha = (elevation) => {
 };
 
 const Root = styled(DialogContent, { name: 'ScrollIndicatedDialogContent', slot: 'root' })(({ ownerState, theme }) => {
-  // In dark mode, paper has a elevation-dependent background color:
+  // In dark mode, paper has an elevation-dependent background color:
   // https://github.com/mui/material-ui/blob/v5.15.0/packages/mui-material/src/Paper/Paper.js#L55-L60
   const bgcolor = theme.palette.mode === 'dark' ? {
     backgroundImage: `linear-gradient(${alpha(
diff --git a/src/components/WindowSideBarAnnotationsPanel.js b/src/components/WindowSideBarAnnotationsPanel.js
index cb552fcef..3db9877cd 100644
--- a/src/components/WindowSideBarAnnotationsPanel.js
+++ b/src/components/WindowSideBarAnnotationsPanel.js
@@ -1,4 +1,4 @@
-import { useRef, useEffect, useState } from 'react';
+import { useRef, useEffect } from 'react';
 import PropTypes from 'prop-types';
 import Typography from '@mui/material/Typography';
 import AnnotationSettings from '../containers/AnnotationSettings';
-- 
GitLab