diff options
Diffstat (limited to 'frontend/src/tabs-hook.tsx')
| -rw-r--r-- | frontend/src/tabs-hook.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/frontend/src/tabs-hook.tsx b/frontend/src/tabs-hook.tsx index d9c76ca6..3498b1aa 100644 --- a/frontend/src/tabs-hook.tsx +++ b/frontend/src/tabs-hook.tsx @@ -128,22 +128,23 @@ class TabsHook extends Logger { let deckyTabAmount = existingTabs.reduce((prev: any, cur: any) => (cur.decky ? prev + 1 : prev), 0); if (deckyTabAmount == this.tabs.length) { for (let tab of existingTabs) { - if (tab?.decky) tab.panel.props.setter[0](visible); + if (tab?.decky && tab?.qAMVisibilitySetter) tab?.qAMVisibilitySetter(visible); } return; } for (const { title, icon, content, id } of this.tabs) { - existingTabs.push({ + const tab: any = { key: id, title, tab: icon, decky: true, - panel: ( - <QuickAccessVisibleStateProvider initial={visible} setter={[]}> - {content} - </QuickAccessVisibleStateProvider> - ), - }); + }; + tab.panel = ( + <QuickAccessVisibleStateProvider initial={visible} tab={tab}> + {content} + </QuickAccessVisibleStateProvider> + ); + existingTabs.push(tab); } } } |
