From aca15517b191f725b9c24b30519a761112230201 Mon Sep 17 00:00:00 2001 From: Birm Date: Fri, 6 Dec 2024 11:19:14 -0500 Subject: [PATCH] lintfix --- .../Layout/VisGridView/SideView/SideView.js | 15 ++++++++------- .../VisGridView/SideView/VisItem/VisItem.js | 10 +++++----- .../VisItem/VisItemContent/VisItemContent.js | 5 +---- .../VisItem/VisItemControl/VisItemControl.js | 4 ++-- .../VisItem/VisItemHeader/VisItemHeader.js | 2 +- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/source/components/Layout/VisGridView/SideView/SideView.js b/source/components/Layout/VisGridView/SideView/SideView.js index 4ac37cb..b1e891e 100644 --- a/source/components/Layout/VisGridView/SideView/SideView.js +++ b/source/components/Layout/VisGridView/SideView/SideView.js @@ -1,4 +1,6 @@ -import React, { useState, useRef, useEffect, useContext, useMemo } from 'react'; +import React, { + useState, useRef, useEffect, useContext, useMemo, +} from 'react'; import { debounce } from 'lodash'; import PropTypes from 'prop-types'; import VisItem from './VisItem/VisItem'; @@ -24,13 +26,12 @@ function SideView({ fullVisScreenHandler, fullScreened, designation }) { const self = useRef(); const visConfig = useMemo(() => { - if (designation === "*") { + if (designation === '*') { return AllVisConfig; // For '*' don't filter, just show all - } else { - return AllVisConfig.filter( - (x) => x.designation === designation || (!x.designation && designation === "default") - ); } + return AllVisConfig.filter( + (x) => x.designation === designation || (!x.designation && designation === 'default'), + ); }, [AllVisConfig, designation]); const updateViewSize = () => { @@ -103,5 +104,5 @@ SideView.propTypes = { }; SideView.defaultProps = { - designation: "*", + designation: '*', }; diff --git a/source/components/Layout/VisGridView/SideView/VisItem/VisItem.js b/source/components/Layout/VisGridView/SideView/VisItem/VisItem.js index 183961b..137a67a 100644 --- a/source/components/Layout/VisGridView/SideView/VisItem/VisItem.js +++ b/source/components/Layout/VisGridView/SideView/VisItem/VisItem.js @@ -1,9 +1,9 @@ import React, { useState, useContext, useEffect } from 'react'; import PropTypes from 'prop-types'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import VisItemContent from './VisItemContent/VisItemContent'; import VisItemHeader from './VisItemHeader/VisItemHeader'; import { DataContext } from '../../../../../contexts/DataContext'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; // css class import './VisItem.css'; @@ -19,7 +19,7 @@ function VisItem(props) { }; const toggleCollapse = () => { - setIsCollapsed(prevState => !prevState); // Toggle collapse state + setIsCollapsed((prevState) => !prevState); // Toggle collapse state }; const { @@ -37,7 +37,7 @@ function VisItem(props) { onMouseLeave={onMouseLeaveHandle} style={{ height: isCollapsed ? '25px' : '300px', // Adjust height based on collapsed state - //transition: 'height 0.3s ease', // Smooth transition for height change + // transition: 'height 0.3s ease', // Smooth transition for height change }} > -

+

) : ( props.isResizing ? ( @@ -107,7 +107,7 @@ VisItem.propTypes = { }), fullScreened: PropTypes.bool.isRequired, toggleFullScreen: PropTypes.func.isRequired, - isResizing: PropTypes.bool, // Ensuring isResizing is also considered + isResizing: PropTypes.bool, // Ensuring isResizing is also considered logScale: PropTypes.bool, }; diff --git a/source/components/Layout/VisGridView/SideView/VisItem/VisItemContent/VisItemContent.js b/source/components/Layout/VisGridView/SideView/VisItem/VisItemContent/VisItemContent.js index 891a308..b41627f 100644 --- a/source/components/Layout/VisGridView/SideView/VisItem/VisItemContent/VisItemContent.js +++ b/source/components/Layout/VisGridView/SideView/VisItem/VisItemContent/VisItemContent.js @@ -44,9 +44,6 @@ function VisItemContent(props) { case 'VisDataTable': component = ; break; - case 'SelectDataTable': - component = ; - break; case 'VisCard': component = ; break; @@ -68,7 +65,7 @@ function VisItemContent(props) { default: component = (

- I'm Sorry. There Is No + I'm Sorry. There Is No {TagName} {' '} Component... diff --git a/source/components/Layout/VisGridView/SideView/VisItem/VisItemControl/VisItemControl.js b/source/components/Layout/VisGridView/SideView/VisItem/VisItemControl/VisItemControl.js index fd07734..0ce52e2 100644 --- a/source/components/Layout/VisGridView/SideView/VisItem/VisItemControl/VisItemControl.js +++ b/source/components/Layout/VisGridView/SideView/VisItem/VisItemControl/VisItemControl.js @@ -37,10 +37,10 @@ function VisItemControl(props) { background: 'none', border: 'none', }} - aria-label={props.isCollapsed ? "Expand" : "Collapse"} + aria-label={props.isCollapsed ? 'Expand' : 'Collapse'} onClick={props.toggleCollapse} > - +