mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-06-15 12:31: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 { useThemeContext } from '../Theme/ThemeContext';
|
||||||
import { useTranslation } from 'react-i18next';
|
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) => {
|
({ app, hide, isDevMode, skipAuth }, iframeRef) => {
|
||||||
const { window: frameWindow } = useFrame();
|
const { window: frameWindow } = useFrame();
|
||||||
const { path, history, changeCurrentIndex, resetHistory } =
|
const { path, history, changeCurrentIndex, resetHistory } =
|
||||||
|
@ -2,8 +2,19 @@ import { forwardRef } from 'react';
|
|||||||
import { AppViewer } from './AppViewer';
|
import { AppViewer } from './AppViewer';
|
||||||
import Frame from 'react-frame-component';
|
import Frame from 'react-frame-component';
|
||||||
|
|
||||||
const AppViewerContainer = forwardRef(
|
type AppViewerContainerProps = {
|
||||||
({ app, isSelected, hide, isDevMode, customHeight, skipAuth }, ref) => {
|
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 (
|
return (
|
||||||
<Frame
|
<Frame
|
||||||
id={`browser-iframe-${app?.tabId}`}
|
id={`browser-iframe-${app?.tabId}`}
|
||||||
@ -48,7 +59,6 @@ const AppViewerContainer = forwardRef(
|
|||||||
/>
|
/>
|
||||||
</Frame>
|
</Frame>
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
export default AppViewerContainer;
|
export default AppViewerContainer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user