From 1f5a604932b1bd1bcee8acae2fd99f965c204c35 Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Fri, 30 May 2025 09:22:07 +0200 Subject: [PATCH] Add types --- src/components/Apps/AppViewer.tsx | 9 ++- src/components/Apps/AppViewerContainer.tsx | 74 ++++++++++++---------- 2 files changed, 50 insertions(+), 33 deletions(-) diff --git a/src/components/Apps/AppViewer.tsx b/src/components/Apps/AppViewer.tsx index 9c82ebd..606f80a 100644 --- a/src/components/Apps/AppViewer.tsx +++ b/src/components/Apps/AppViewer.tsx @@ -7,7 +7,14 @@ import { useQortalMessageListener } from '../../hooks/useQortalMessageListener'; import { useThemeContext } from '../Theme/ThemeContext'; import { useTranslation } from 'react-i18next'; -export const AppViewer = forwardRef( +type AppViewerProps = { + app: any; + hide: boolean; + isDevMode: boolean; + skipAuth?: boolean; +}; + +export const AppViewer = forwardRef( ({ app, hide, isDevMode, skipAuth }, iframeRef) => { const { window: frameWindow } = useFrame(); const { path, history, changeCurrentIndex, resetHistory } = diff --git a/src/components/Apps/AppViewerContainer.tsx b/src/components/Apps/AppViewerContainer.tsx index ae05788..e26eb4a 100644 --- a/src/components/Apps/AppViewerContainer.tsx +++ b/src/components/Apps/AppViewerContainer.tsx @@ -2,15 +2,26 @@ import { forwardRef } from 'react'; import { AppViewer } from './AppViewer'; import Frame from 'react-frame-component'; -const AppViewerContainer = forwardRef( - ({ app, isSelected, hide, isDevMode, customHeight, skipAuth }, ref) => { - return ( - - - - } - style={{ - border: 'none', - height: customHeight || '100vh', - left: (!isSelected || hide) && '-200vw', - overflow: 'hidden', - position: (!isSelected || hide) && 'fixed', - width: '100%', - }} - > - - - ); - } -); + + + } + style={{ + border: 'none', + height: customHeight || '100vh', + left: (!isSelected || hide) && '-200vw', + overflow: 'hidden', + position: (!isSelected || hide) && 'fixed', + width: '100%', + }} + > + + + ); +}); export default AppViewerContainer;