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; +}