PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.0
GiveWP – Donation Plugin and Fundraising Platform v4.16.0
4.18.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 All 257 releases
give / src / DonorDashboards / resources / js / app / tabs / index.js

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

30 lines 980 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Internal dependencies
2 import {registerAnnualReceiptsTab} from './annual-receipts';
3 import {registerDashboardTab} from './dashboard';
4 import {registerDonationHistoryTab} from './donation-history';
5 import {registerEditProfileTab} from './edit-profile';
6 import {registerRecurringDonationsTab} from './recurring-donations';
7 import {getWindowData} from '../utils';
8
9 export const registerDefaultTabs = () => {
10 // Dashboard Tab should always register
11 registerDashboardTab();
12
13 const tabRegistrationMap = {
14 'donation-history': registerDonationHistoryTab,
15 'annual-receipts': registerAnnualReceiptsTab,
16 'recurring-donations': registerRecurringDonationsTab,
17 };
18
19 const registeredTabs = getWindowData('registeredTabs');
20
21 registeredTabs.forEach((tab) => {
22 if (tabRegistrationMap[tab]) {
23 tabRegistrationMap[tab]();
24 }
25 });
26
27 // Make sure that Edit Profile tab is registered last
28 registerEditProfileTab();
29 };
30