diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx index a4b28733..2d871508 100644 --- a/src/components/LayerUI.tsx +++ b/src/components/LayerUI.tsx @@ -412,23 +412,6 @@ const LayerUI = ({ ); - const renderStats = () => { - if (!appState.showStats) { - return null; - } - return ( - { - actionManager.executeAction(actionToggleStats); - }} - renderCustomStats={renderCustomStats} - /> - ); - }; - return device.isMobile ? ( <> {dialogs} @@ -449,7 +432,7 @@ const LayerUI = ({ showThemeBtn={showThemeBtn} onImageAction={onImageAction} renderTopRightUI={renderTopRightUI} - renderStats={renderStats} + renderCustomStats={renderCustomStats} /> ) : ( @@ -478,7 +461,17 @@ const LayerUI = ({ renderCustomFooter={renderCustomFooter} showExitZenModeBtn={showExitZenModeBtn} /> - {renderStats()} + {appState.showStats && ( + { + actionManager.executeAction(actionToggleStats); + }} + renderCustomStats={renderCustomStats} + /> + )} {appState.scrolledOutside && (