one-click-accessibility/modules/settings/assets/js/admin.js
VasylD 38bdaef8b6
[APP-1107] Add dashboard for analytics (#204)
* [APP-1108][APP-1109][APP-1110] Add analytics backend logic

* [APP-1108][APP-1109][APP-1110] Add analytics backend logic

* Add nonce to the widget settings

* Update routes and DB table

* Fix comments

* Fix comments

* Fix comments

* Fix comments

* Fix comments

* Fix comments

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1107] Add dashboard for analytics

* [APP-1201] add accessibility rules

* [APP-1107] fixed API endpoint

* [APP-1107] fixed API endpoint

* [APP-1107] fixed API endpoint

* [APP-1107] add check for is_active

* update to the latest

* update to the latest

* update to the latest

* fix bugs, add changes

* fix bugs, add changes

* fix bugs, add changes

* fix bugs, add changes
2025-03-17 12:26:52 +02:00

27 lines
890 B
JavaScript

import { SettingsProvider, NotificationsProvider } from '@ea11y/hooks';
import { StrictMode, Fragment, createRoot } from '@wordpress/element';
import App from './app';
import { AnalyticsContextProvider } from './contexts/analytics-context';
import { PluginSettingsProvider } from './contexts/plugin-settings';
const rootNode = document.getElementById('ea11y-app');
// Can't use the settings hook in the global scope so accessing directly
const isDevelopment = window?.ea11ySettingsData?.isDevelopment;
const AppWrapper = Boolean(isDevelopment) ? StrictMode : Fragment;
const root = createRoot(rootNode);
root.render(
<AppWrapper>
<NotificationsProvider>
<SettingsProvider>
<PluginSettingsProvider>
<AnalyticsContextProvider>
<App />
</AnalyticsContextProvider>
</PluginSettingsProvider>
</SettingsProvider>
</NotificationsProvider>
</AppWrapper>,
);