diff --git a/frontend/src/components/PluginView.tsx b/frontend/src/components/PluginView.tsx index 997e576b8..07367bc34 100644 --- a/frontend/src/components/PluginView.tsx +++ b/frontend/src/components/PluginView.tsx @@ -1,4 +1,4 @@ -import { ButtonItem, Focusable, PanelSection, PanelSectionRow } from '@decky/ui'; +import { ButtonItem, ErrorBoundary, Focusable, PanelSection, PanelSectionRow } from '@decky/ui'; import { FC, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { FaEyeSlash } from 'react-icons/fa'; @@ -29,7 +29,9 @@ const PluginView: FC = () => {
- {(visible || activePlugin.alwaysRender) && activePlugin.content} + + {(visible || activePlugin.alwaysRender) && activePlugin.content} +
); diff --git a/frontend/src/router-hook.tsx b/frontend/src/router-hook.tsx index a42c2daab..7b66d351e 100644 --- a/frontend/src/router-hook.tsx +++ b/frontend/src/router-hook.tsx @@ -1,4 +1,4 @@ -import { Export, Patch, afterPatch, findModuleExport } from '@decky/ui'; +import { ErrorBoundary, Focusable, Patch, afterPatch } from '@decky/ui'; import { FC, ReactElement, ReactNode, cloneElement, createElement, memo } from 'react'; import type { Route } from 'react-router'; @@ -41,9 +41,7 @@ class RouterHook extends Logger { window.__ROUTER_HOOK_INSTANCE?.deinit?.(); window.__ROUTER_HOOK_INSTANCE = this; - this.gamepadWrapper = findModuleExport((e: Export) => - e?.render?.toString()?.includes('["flow-children","onActivate","onCancel","focusClassName",'), - ); + this.gamepadWrapper = Focusable; let Route: new () => Route; // Used to store the new replicated routes we create to allow routes to be unpatched. @@ -63,7 +61,9 @@ class RouterHook extends Logger { routes.forEach(({ component, props }, path) => { newRouterArray.push( - {createElement(component)} + + {createElement(component)} + , ); }); diff --git a/frontend/src/tabs-hook.tsx b/frontend/src/tabs-hook.tsx index f42a4aeab..4ddea44a9 100644 --- a/frontend/src/tabs-hook.tsx +++ b/frontend/src/tabs-hook.tsx @@ -1,5 +1,5 @@ // TabsHook for versions after the Desktop merge -import { Patch, QuickAccessTab, afterPatch, findInReactTree, getReactRoot, sleep } from '@decky/ui'; +import { ErrorBoundary, Patch, QuickAccessTab, afterPatch, findInReactTree, getReactRoot, sleep } from '@decky/ui'; import { QuickAccessVisibleStateProvider } from './components/QuickAccessVisibleState'; import Logger from './logger'; @@ -147,7 +147,7 @@ class TabsHook extends Logger { decky: true, initialVisibility: visible, }; - tab.panel = {content}; + tab.panel = {content}; existingTabs.push(tab); } }