mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-15 04:21:21 +00:00
Add types
This commit is contained in:
parent
be5c3af318
commit
1f5a604932
@ -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<HTMLIFrameElement, AppViewerProps>(
|
||||
({ app, hide, isDevMode, skipAuth }, iframeRef) => {
|
||||
const { window: frameWindow } = useFrame();
|
||||
const { path, history, changeCurrentIndex, resetHistory } =
|
||||
|
@ -2,8 +2,19 @@ import { forwardRef } from 'react';
|
||||
import { AppViewer } from './AppViewer';
|
||||
import Frame from 'react-frame-component';
|
||||
|
||||
const AppViewerContainer = forwardRef(
|
||||
({ app, isSelected, hide, isDevMode, customHeight, skipAuth }, ref) => {
|
||||
type AppViewerContainerProps = {
|
||||
app: any; // Replace `any` with the correct type of `tab` if available
|
||||
isSelected: boolean;
|
||||
hide: boolean;
|
||||
isDevMode: boolean;
|
||||
customHeight?: string;
|
||||
skipAuth?: boolean;
|
||||
};
|
||||
|
||||
const AppViewerContainer = forwardRef<
|
||||
HTMLIFrameElement,
|
||||
AppViewerContainerProps
|
||||
>(({ app, isSelected, hide, isDevMode, customHeight, skipAuth }, ref) => {
|
||||
return (
|
||||
<Frame
|
||||
id={`browser-iframe-${app?.tabId}`}
|
||||
@ -48,7 +59,6 @@ const AppViewerContainer = forwardRef(
|
||||
/>
|
||||
</Frame>
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
export default AppViewerContainer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user