decord/source/modules/activate_device/useActivateDeviceStepTracking.tsx

42 lines
1.4 KiB
TypeScript
Raw Normal View History

// Module ID: 13990
// Function ID: 13991
2026-07-20 16:05:17 +00:00
// Name: useActivateDeviceStepTracking
// Dependencies: [19, 1074, 8421, 13991, 1241, 2]
2026-07-20 16:05:17 +00:00
// Exports: useActivateDeviceStepTracking
// Module 13990 (useActivateDeviceStepTracking)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
import usePreviousDefault from "usePrevious" /* 8421 */;
import ActivateDeviceUtils from "ActivateDeviceUtils" /* 13991 */;
import noop from "module_19" /* 19 */;
2026-07-20 16:05:17 +00:00
require = fn;
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
let result = size.fileFinishedImporting("modules/activate_device/useActivateDeviceStepTracking.tsx");
2026-07-20 16:05:17 +00:00
export const useActivateDeviceStepTracking = function useActivateDeviceStepTracking(arg0) {
closure_0 = arg0;
const tmp = usePreviousDefault(arg0);
2026-07-23 10:11:24 +00:00
importDefault = tmp;
const items = [tmp, arg0];
const effect = noop.useEffect(() => {
if (closure_0 !== closure_1) {
2026-07-29 08:29:29 +00:00
let tmp3 = "user-code-input" !== tmp.type;
if (tmp3) {
tmp3 = "handoff" !== tmp.type;
2026-07-20 16:05:17 +00:00
}
let result = null;
2026-07-29 08:29:29 +00:00
if (tmp3) {
result = ActivateDeviceUtils.clientIdToActivateDevicePlatform(tmp.userCodeData.clientId);
2026-07-20 16:05:17 +00:00
}
let type;
2026-07-29 08:29:29 +00:00
if (tmp2 != null) {
type = tmp2.type;
2026-07-20 16:05:17 +00:00
}
const obj3 = { previous_step: type, current_step: tmp.type, platform_type: result };
AnalyticsUtilsDefault.track(AnalyticEvents.DEVICE_LINK_STEP, obj3);
2026-07-20 16:05:17 +00:00
}
}, items);
};