Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
32 lines
1.7 KiB
TypeScript
32 lines
1.7 KiB
TypeScript
// Module ID: 14995
|
|
// Function ID: 14996
|
|
// Name: useSelectedTab
|
|
// Dependencies: [7651, 7652, 1074, 563, 7653, 1241, 2]
|
|
// Exports: default
|
|
|
|
// Module 14995 (useSelectedTab)
|
|
import useStateFromStores from "useStateFromStores" /* 563 */;
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
|
|
import FamilyCenterActionCreatorsDefault from "FamilyCenterActionCreators" /* 7653 */;
|
|
import FamilyCenterStore from "FamilyCenterStore" /* 7651 */;
|
|
|
|
require = fn;
|
|
const FamilyCenterConstants = fn(7652);
|
|
({ FamilyCenterAction: closure_4, FamilyCenterSubPages } = FamilyCenterConstants);
|
|
const AnalyticEvents = fn(1074).AnalyticEvents;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/parent_tools/hooks/useSelectedTab.tsx");
|
|
|
|
export default function useSelectedMyFamilyTab() {
|
|
let obj = {
|
|
selectedTab: null,
|
|
handleTabChange(tab) {
|
|
tab = FamilyCenterActionCreatorsDefault.selectTab(tab);
|
|
AnalyticsUtilsDefault.track(constants.FAMILY_CENTER_ACTION, { action: TabChange.TabChange, tab });
|
|
}
|
|
};
|
|
const items = [FamilyCenterStore];
|
|
obj.selectedTab = useStateFromStores.useStateFromStores(items, () => selectedTab.getSelectedTab());
|
|
return obj;
|
|
};
|
|
export const FAMILY_CENTER_TAB_ANALYTICS_LABELS = { [FamilyCenterSubPages.ACTIVITY]: "family_center_activity_tab", [FamilyCenterSubPages.REQUESTS]: "family_center_requests_tab", [FamilyCenterSubPages.SETTINGS]: "family_center_settings_tab", [FamilyCenterSubPages.CONTENT_AND_SOCIAL]: "family_center_content_and_social_panel", [FamilyCenterSubPages.DATA_AND_PRIVACY]: "family_center_data_and_privacy_panel", [FamilyCenterSubPages.SCREEN_TIME_CONTROLS]: "family_center_screen_time_controls_panel" };
|