PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
give / src / DonorDashboards / resources / js / app / index.js

index.js in GiveWP – Donation Plugin and Fundraising Platform 4.17.0, at src/DonorDashboards/resources/js/app/index.js

52 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Entry point for Donor Profile app
2
3 // Vendor dependencies
4 import {HashRouter as Router} from 'react-router-dom';
5 import {createRoot} from 'react-dom/client';
6 import React from 'react';
7 import {Provider} from 'react-redux';
8
9 import {library} from '@fortawesome/fontawesome-svg-core';
10 import {fas} from '@fortawesome/free-solid-svg-icons';
11
12 window.React = React;
13
14 library.add(fas);
15
16 // Store dependencies
17 import {store} from './store';
18
19 // Internal dependencies
20 import {registerDefaultTabs} from './tabs';
21 import {registerTab} from './utils';
22
23 // DonorDashboards app
24 import App from './components/app';
25
26 import './style.scss';
27
28 window.giveDonorDashboard = {
29 store,
30 utils: {
31 registerTab,
32 },
33 };
34
35 /**
36 * @since 2.11.1 Load after DOM Content is loaded so that wp.i18n available to parse translatable strings.
37 * @link https://github.com/impress-org/givewp/pull/5842
38 */
39 window.addEventListener('DOMContentLoaded', (event) => {
40 registerDefaultTabs();
41
42 const root = createRoot(document.getElementById('give-donor-dashboard'));
43
44 root.render(
45 <Provider store={store}>
46 <Router>
47 <App />
48 </Router>
49 </Provider>,
50 );
51 });
52