Skip to content

Commit

Permalink
Fixed lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Dong <[email protected]>
  • Loading branch information
danieldong51 committed Aug 21, 2024
1 parent 6e7d30e commit 0780a07
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion public/components/custom_panels/custom_panel_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const CustomPanelTable = ({
sourcePanel = legacyFetchResult.operationalPanel;
}

const { id, ...newPanel } = {
const { ...newPanel } = {
...sourcePanel,
title: newName,
};
Expand Down
5 changes: 2 additions & 3 deletions public/components/custom_panels/custom_panel_view_so.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import { DurationRange } from '@elastic/eui/src/components/date_picker/types';
import last from 'lodash/last';
import moment from 'moment';
import React, { useCallback, useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { CoreStart } from '../../../../../src/core/public';
import { CREATE_PANEL_MESSAGE } from '../../../common/constants/custom_panels';
Expand Down Expand Up @@ -119,7 +119,6 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
parentBreadcrumbs,
childBreadcrumbs,
updateAvailabilityVizId,
cloneCustomPanel,
onEditClick,
onAddClick,
} = props;
Expand All @@ -131,7 +130,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => {
const [loading, setLoading] = useState(true);

const [pplFilterValue, setPPLFilterValue] = useState('');
const [baseQuery, setBaseQuery] = useState('');
const [baseQuery, _] = useState('');
const [onRefresh, setOnRefresh] = useState(false);

const [inputDisabled, setInputDisabled] = useState(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
* optionalArgs - Arguments needed to pass them to runModal function
*/

type CustomInputModalProps = {
interface CustomInputModalProps {
runModal:
| ((value: string, value2: string, value3: string, value4: string) => void)
| ((value: string) => void);
Expand All @@ -48,7 +48,7 @@ type CustomInputModalProps = {
openPanelName?: string;
helpText?: string;
optionalArgs?: string[];
};
}

export const CustomInputModal = (props: CustomInputModalProps) => {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const VisaulizationFlyout = ({
const [modalContent, setModalContent] = useState(<></>);

const closeModal = () => setIsModalVisible(false);
const showModal = (modalType: string) => {
const showModal = (_: string) => {
setModalContent(
<EuiModal onClose={closeModal}>
<EuiModalHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const VisaulizationFlyoutSO = ({
const [modalContent, setModalContent] = useState(<></>);

const closeModal = () => setIsModalVisible(false);
const showModal = (modalType: string) => {
const showModal = (_: string) => {
setModalContent(
<EuiModal onClose={closeModal}>
<EuiModalHeader>
Expand Down Expand Up @@ -178,7 +178,7 @@ export const VisaulizationFlyoutSO = ({
replaceVizInPanel(panel, replaceVisualizationId, selectValue, newVisualizationTitle)
);
} else {
const visualizationsWithNewPanel = addVisualizationPanel({
addVisualizationPanel({
savedVisualizationId: selectValue,
onSuccess: `Visualization ${newVisualizationTitle} successfully added!`,
onFailure: `Error in adding ${newVisualizationTitle} visualization to the panel`,
Expand Down

0 comments on commit 0780a07

Please sign in to comment.