decord/source/modules/user_profile/hooks/useTrackUserProfileActivityAction.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

42 lines
1.9 KiB
TypeScript

// Module ID: 13050
// Function ID: 13051
// Name: useTrackUserProfileActivityAction
// Dependencies: [19, 8825, 8216, 7176, 504, 8217, 2]
// Exports: default
// Module 13050 (useTrackUserProfileActivityAction)
import _mod19 from "module_19" /* 19 */;
import UserProfileAnalyticsUtils from "UserProfileAnalyticsUtils" /* 8217 */;
import ContentInventoryOutboxStore from "ContentInventoryOutboxStore" /* 8825 */;
import size from "module_2" /* 2 */;
const require = globalThis.__r;
_mod19.useCallback;
let result = size.fileFinishedImporting("modules/user_profile/hooks/useTrackUserProfileActivityAction.tsx");
export default function useTrackUserProfileActivityAction(activity) {
({ user: require, display } = activity);
activity = activity.activity;
const entry = activity.entry;
const stream = activity.stream;
const voiceChannelId = activity.voiceChannelId;
let analyticsLocations;
let stateFromStores;
const userProfileAnalyticsContext = require("UserProfileAnalyticsContext").useUserProfileAnalyticsContext();
const context = userProfileAnalyticsContext.context;
const trackUserProfileAction = userProfileAnalyticsContext.trackUserProfileAction;
if (analyticsLocations == null) {
analyticsLocations = display(activity[3])().analyticsLocations;
}
const obj = require("UserProfileAnalyticsContext");
const items = [stream];
stateFromStores = require("initialize").useStateFromStores(items, () => ContentInventoryOutboxStore.getUserOutbox(id.id));
const items1 = [trackUserProfileAction, context, display, activity, stream, entry, stateFromStores, voiceChannelId, analyticsLocations];
return entry((action) => {
action = action.action;
trackUserProfileAction({ action, analyticsLocations });
const merged = Object.assign(context);
const result = UserProfileAnalyticsUtils.trackUserProfileActivityAction({ action, display, activity, entry, stream, outbox: stateFromStores, voiceChannelId, analyticsLocations });
}, items1);
};