| 1 |
/** |
| 2 |
* WordPress dependencies. |
| 3 |
*/ |
| 4 |
import { render } from '@wordpress/element'; |
| 5 |
|
| 6 |
/** |
| 7 |
* Internal dependencies. |
| 8 |
*/ |
| 9 |
import { AppContext } from './context'; |
| 10 |
import SynonymsEditor from './components/SynonymsEditor'; |
| 11 |
|
| 12 |
const SELECTOR = '#synonym-root'; |
| 13 |
|
| 14 |
/** |
| 15 |
* Get Root. |
| 16 |
* |
| 17 |
* @returns {Element|false} Root element |
| 18 |
*/ |
| 19 |
const getRoot = () => document.querySelector(SELECTOR) || false; |
| 20 |
|
| 21 |
render( |
| 22 |
<AppContext> |
| 23 |
<SynonymsEditor /> |
| 24 |
</AppContext>, |
| 25 |
getRoot(), |
| 26 |
); |
| 27 |
|