@@ -74,39 +74,39 @@ export function Layout() {
7474 setSelectedItemId ( itemId ) ;
7575 } , [ ] ) ;
7676
77- // Listen for hash changes (back/forward navigation)
77+ // Listen for hash changes (back/forward navigation).
7878 useEffect ( ( ) => {
79- const handleHashChange = ( ) => {
79+ const syncUrlToState = ( ) => {
8080 const { section, itemId } = parseHash ( ) ;
8181 setActiveSection ( section ) ;
8282 setSelectedItemId ( itemId ) ;
8383 } ;
8484
85- window . addEventListener ( 'hashchange' , handleHashChange ) ;
85+ window . addEventListener ( 'hashchange' , syncUrlToState ) ;
8686 return ( ) => {
87- window . removeEventListener ( 'hashchange' , handleHashChange ) ;
87+ window . removeEventListener ( 'hashchange' , syncUrlToState ) ;
8888 } ;
8989 } , [ ] ) ;
9090
91- const handleSelectItem = ( id : string | number ) => {
91+ const selectItem = ( id : string | number ) => {
9292 setSelectedItemId ( id ) ;
9393 updateHash ( activeSection , id ) ;
9494 } ;
9595
96- const handleCloseInspector = ( ) => {
96+ const closeInspector = ( ) => {
9797 setSelectedItemId ( null ) ;
9898 updateHash ( activeSection ) ;
9999 } ;
100100
101- const handleNavigate = ( section : string ) => {
101+ const navigate = ( section : string ) => {
102102 setActiveSection ( section ) ;
103103 setSelectedItemId ( null ) ;
104104 updateHash ( section ) ;
105105 } ;
106106
107107 // Render main content (stage) with Suspense for lazy loading
108108 const renderStage = ( ) => {
109- const props = { onSelectItem : handleSelectItem } ;
109+ const props = { onSelectItem : selectItem } ;
110110
111111 let StageComponent ;
112112 switch ( activeSection ) {
@@ -145,7 +145,7 @@ export function Layout() {
145145 return null ;
146146 }
147147 InspectorComponent = FeedInspector ;
148- props = { id : selectedItemId , onClose : handleCloseInspector } ;
148+ props = { id : selectedItemId , onClose : closeInspector } ;
149149 }
150150
151151 return (
@@ -169,7 +169,7 @@ export function Layout() {
169169 < div className = "app-content" >
170170 { /* Sidebar - 240px fixed width (no Panel wrapper, stays dark) */ }
171171 < div className = "sidebar-region" >
172- < Sidebar activeSection = { activeSection } onNavigate = { handleNavigate } />
172+ < Sidebar activeSection = { activeSection } onNavigate = { navigate } />
173173 </ div >
174174
175175 { /* Stage - main content area */ }
0 commit comments