From 2ec9722a24915e07478f66ed15e7eb231e5e0a50 Mon Sep 17 00:00:00 2001 From: Luiz Bezerra Date: Fri, 27 Dec 2024 13:12:46 +0000 Subject: [PATCH] improvements Signed-off-by: Luiz Bezerra --- packages/suite-desktop/src/preload/index.ts | 5 +++-- packages/suite-desktop/src/renderer/Root.tsx | 12 +++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/suite-desktop/src/preload/index.ts b/packages/suite-desktop/src/preload/index.ts index 06b7d4ebe6..ec780b460f 100644 --- a/packages/suite-desktop/src/preload/index.ts +++ b/packages/suite-desktop/src/preload/index.ts @@ -18,6 +18,7 @@ import { getExtensions, installExtension, loadExtension, uninstallExtension } fr import { fetchLayouts } from "./layouts"; import { decodeRendererArg } from "../common/rendererArgs"; import { + CLIFlags, Desktop, ForwardedMenuEvent, ForwardedWindowEvent, @@ -117,8 +118,8 @@ export function main(): void { async updateLanguage() { await ipcRenderer.invoke("updateLanguage"); }, - async getCLIFlags(): Promise>> { - return await (ipcRenderer.invoke("getCLIFlags") as Promise>>); + async getCLIFlags(): Promise { + return await (ipcRenderer.invoke("getCLIFlags") as Promise); }, getDeepLinks(): string[] { return deepLinks; diff --git a/packages/suite-desktop/src/renderer/Root.tsx b/packages/suite-desktop/src/renderer/Root.tsx index 636435ce50..18b2e86958 100644 --- a/packages/suite-desktop/src/renderer/Root.tsx +++ b/packages/suite-desktop/src/renderer/Root.tsx @@ -37,16 +37,18 @@ const storageBridge = (global as unknown as { storageBridge?: Storage }).storage const menuBridge = (global as { menuBridge?: NativeMenuBridge }).menuBridge; const ctxbridge = (global as { ctxbridge?: OsContext }).ctxbridge; -export default function Root(props: { +type RootProps = { appParameters: CLIFlags; appConfiguration: IAppConfiguration; extraProviders: React.JSX.Element[] | undefined; dataSources: IDataSourceFactory[] | undefined; -}): React.JSX.Element { +}; + +export default function Root(props: RootProps): React.JSX.Element { if (!storageBridge) { throw new Error("storageBridge is missing"); } - const { appConfiguration } = props; + const { appConfiguration, appParameters, extraProviders } = props; useEffect(() => { const handler = () => { @@ -150,7 +152,7 @@ export default function Root(props: { return ( ); }