From 28d4506831e5684da7d83289441bc88658816aa1 Mon Sep 17 00:00:00 2001
From: Prakriti Solankey <156313631+prakriti-solankey@users.noreply.github.com>
Date: Tue, 14 Jan 2025 12:05:35 +0000
Subject: [PATCH] linting issues
---
frontend/src/HOC/withVisibility.tsx | 14 --------------
frontend/src/components/ChatBot/ChatInfoModal.tsx | 2 +-
frontend/src/types.ts | 4 ++++
3 files changed, 5 insertions(+), 15 deletions(-)
delete mode 100644 frontend/src/HOC/withVisibility.tsx
diff --git a/frontend/src/HOC/withVisibility.tsx b/frontend/src/HOC/withVisibility.tsx
deleted file mode 100644
index 057c38bd..00000000
--- a/frontend/src/HOC/withVisibility.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-interface VisibilityProps {
- isVisible: boolean;
-}
-export function withVisibility
(WrappedComponent: React.ComponentType
) {
- const VisibityControlled = (props: P & VisibilityProps) => {
- if (props.isVisible === false) {
- return null;
- }
-
- return ;
- };
-
- return VisibityControlled;
-}
diff --git a/frontend/src/components/ChatBot/ChatInfoModal.tsx b/frontend/src/components/ChatBot/ChatInfoModal.tsx
index 97a244b3..665f0aed 100644
--- a/frontend/src/components/ChatBot/ChatInfoModal.tsx
+++ b/frontend/src/components/ChatBot/ChatInfoModal.tsx
@@ -37,7 +37,7 @@ import { Stack } from '@mui/material';
import { capitalizeWithUnderscore, getNodes } from '../../utils/Utils';
import MultiModeMetrics from './MultiModeMetrics';
import getAdditionalMetrics from '../../services/AdditionalMetrics';
-import { withVisibility } from '../../HOC/withVisibility';
+import { withVisibility } from '../../HOC/WithVisibility';
import MetricsCheckbox from './MetricsCheckbox';
const ChatInfoModal: React.FC = ({
diff --git a/frontend/src/types.ts b/frontend/src/types.ts
index d1b46124..1c3e680c 100644
--- a/frontend/src/types.ts
+++ b/frontend/src/types.ts
@@ -937,3 +937,7 @@ export interface filedate {
};
}
export type FileTableHandle = React.ElementRef;
+
+export interface VisibilityProps {
+ isVisible: boolean;
+}