diff --git a/src/renderer/components/Toolbar/AnalysisToolbar.tsx b/src/renderer/components/Toolbar/AnalysisToolbar.tsx index f6987e3..6e8d076 100644 --- a/src/renderer/components/Toolbar/AnalysisToolbar.tsx +++ b/src/renderer/components/Toolbar/AnalysisToolbar.tsx @@ -420,6 +420,40 @@ export function AnalysisToolbar(): JSX.Element { ) : ( <> + + + {activeFilePath && paragraphRhythm.length > 0 && ( + + )} + {activeFilePath && sentenceStats && ( + + )} - - {activeFilePath && paragraphRhythm.length > 0 && ( - <> - - {rhythmOpen && rhythmButtonRef.current && createPortal( + {activeFilePath && paragraphRhythm.length > 0 && rhythmOpen && rhythmButtonRef.current && createPortal( (() => { const rect = rhythmButtonRef.current!.getBoundingClientRect() return ( @@ -591,21 +601,9 @@ export function AnalysisToolbar(): JSX.Element { ) })(), document.body - )} - )} - {activeFilePath && sentenceStats && ( - <> - - {statsOpen && statsButtonRef.current && createPortal( + {activeFilePath && sentenceStats && statsOpen && statsButtonRef.current && createPortal( (() => { const rect = statsButtonRef.current!.getBoundingClientRect() const maxBin = Math.max(...sentenceStats.bins, 1) @@ -673,8 +671,6 @@ export function AnalysisToolbar(): JSX.Element { ) })(), document.body - )} - )} {activeFilePath && (