| @@ -25,10 +25,18 @@ | ||
| 25 | 25 | container.textContent = ''; |
| 26 | 26 | container.setAttribute( 'aria-busy', 'false' ); |
| 27 | 27 | container.setAttribute( 'aria-label', __( 'CryptX settings', 'cryptx' ) ); |
| 28 | 28 | |
| 29 | + // Two screens, one application. The site screen edits this site; the | |
| 30 | + // network screen edits what a newly created site starts with. PHP says | |
| 31 | + // which, because PHP is what knows which menu entry was opened. | |
| 32 | + const scope = | |
| 33 | + container.getAttribute( 'data-cryptx-scope' ) === 'network' | |
| 34 | + ? 'network' | |
| 35 | + : 'site'; | |
| 36 | + | |
| 29 | 37 | createRoot( container ).render( |
| 30 | 38 | <StrictMode> |
| 31 | - <App /> | |
| 39 | + <App scope={ scope } /> | |
| 32 | 40 | </StrictMode> |
| 33 | 41 | ); |
| 34 | 42 | } ); |