Skip to content

Commit

Permalink
Return isNavigationOpened directly from selector
Browse files Browse the repository at this point in the history
  • Loading branch information
jeyip authored and Copons committed Oct 15, 2020
1 parent aa91cd3 commit 4a2937a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/edit-site/src/components/navigation-sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import NavigationPanel from './navigation-panel';
import NavigationToggle from './navigation-toggle';

const NavigationSidebar = () => {
const { isNavigationOpen } = useSelect( ( select ) => {
const { isNavigationOpened } = select( 'core/edit-site' );
return { isNavigationOpen: isNavigationOpened() };
const isNavigationOpen = useSelect( ( select ) => {
return select( 'core/edit-site' ).isNavigationOpened();
} );

return (
Expand Down

0 comments on commit 4a2937a

Please sign in to comment.