File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed
packages/boot/src/components Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 15171517 "markdown_source" : " ../packages/blocks/README.md" ,
15181518 "parent" : " packages"
15191519 },
1520+ {
1521+ "title" : " @wordpress/boot" ,
1522+ "slug" : " packages-boot" ,
1523+ "markdown_source" : " ../packages/boot/README.md" ,
1524+ "parent" : " packages"
1525+ },
15201526 {
15211527 "title" : " @wordpress/browserslist-config" ,
15221528 "slug" : " packages-browserslist-config" ,
Original file line number Diff line number Diff line change 11/**
22 * WordPress dependencies
33 */
4- import { createRoot } from '@wordpress/element' ;
4+ import { createRoot , StrictMode } from '@wordpress/element' ;
55import { dispatch } from '@wordpress/data' ;
66
77/**
@@ -16,9 +16,6 @@ function App() {
1616}
1717
1818export async function init ( menuItems : MenuItem [ ] ) {
19- // Import the store to ensure it's registered
20- await import ( '../../store' ) ;
21-
2219 // Register menu items
2320 menuItems . forEach ( ( menuItem ) => {
2421 // @ts -ignore
@@ -29,6 +26,10 @@ export async function init( menuItems: MenuItem[] ) {
2926 const rootElement = document . getElementById ( 'gutenberg-boot-app' ) ;
3027 if ( rootElement ) {
3128 const root = createRoot ( rootElement ) ;
32- root . render ( < App /> ) ;
29+ root . render (
30+ < StrictMode >
31+ < App />
32+ </ StrictMode >
33+ ) ;
3334 }
3435}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { __ } from '@wordpress/i18n';
1212import { store as coreStore } from '@wordpress/core-data' ;
1313import { decodeEntities } from '@wordpress/html-entities' ;
1414import { search } from '@wordpress/icons' ;
15- import { rawShortcut } from '@wordpress/keycodes' ;
15+ import { displayShortcut } from '@wordpress/keycodes' ;
1616// @ts -expect-error Commands is not typed properly.
1717import { store as commandsStore } from '@wordpress/commands' ;
1818import { filterURLForDisplay } from '@wordpress/url' ;
@@ -40,8 +40,6 @@ function SiteHub() {
4040 } ;
4141 } , [ ] ) ;
4242 const { open : openCommandCenter } = useDispatch ( commandsStore ) ;
43- const label = __ ( 'Open command palette' ) ;
44- const shortcutAria = rawShortcut . primary ( 'k' ) ;
4543
4644 return (
4745 < div className = "boot-site-hub" >
@@ -58,8 +56,8 @@ function SiteHub() {
5856 icon = { search }
5957 onClick = { ( ) => openCommandCenter ( ) }
6058 size = "compact"
61- label = { label }
62- aria-keyshortcuts = { shortcutAria }
59+ label = { __ ( 'Open command palette' ) }
60+ shortcut = { displayShortcut . primary ( 'k' ) }
6361 />
6462 </ HStack >
6563 </ div >
You can’t perform that action at this time.
0 commit comments