decord/source/modules/user_profile/hooks/useTrackUserProfileActivityAction.tsx

43 lines
1.9 KiB
TypeScript
Raw Normal View History

// Module ID: 13050
// Function ID: 13051
2026-07-20 16:05:17 +00:00
// Name: useTrackUserProfileActivityAction
// Dependencies: [19, 8825, 8216, 7176, 504, 8217, 2]
2026-07-20 16:05:17 +00:00
// 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 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
_mod19.useCallback;
let result = size.fileFinishedImporting("modules/user_profile/hooks/useTrackUserProfileActivityAction.tsx");
2026-07-20 16:05:17 +00:00
export default function useTrackUserProfileActivityAction(activity) {
2026-07-23 10:11:24 +00:00
({ user: require, display } = activity);
2026-07-20 16:05:17 +00:00
activity = activity.activity;
const entry = activity.entry;
const stream = activity.stream;
const voiceChannelId = activity.voiceChannelId;
let analyticsLocations;
2026-07-20 16:05:17 +00:00
let stateFromStores;
const userProfileAnalyticsContext = require("UserProfileAnalyticsContext").useUserProfileAnalyticsContext();
const context = userProfileAnalyticsContext.context;
const trackUserProfileAction = userProfileAnalyticsContext.trackUserProfileAction;
2026-07-29 08:29:29 +00:00
if (analyticsLocations == null) {
analyticsLocations = display(activity[3])().analyticsLocations;
2026-07-20 16:05:17 +00:00
}
const obj = require("UserProfileAnalyticsContext");
2026-07-23 10:11:24 +00:00
const items = [stream];
stateFromStores = require("initialize").useStateFromStores(items, () => ContentInventoryOutboxStore.getUserOutbox(id.id));
2026-07-29 08:29:29 +00:00
const items1 = [trackUserProfileAction, context, display, activity, stream, entry, stateFromStores, voiceChannelId, analyticsLocations];
2026-07-23 10:11:24 +00:00
return entry((action) => {
2026-07-20 16:05:17 +00:00
action = action.action;
trackUserProfileAction({ action, analyticsLocations });
2026-07-20 16:05:17 +00:00
const merged = Object.assign(context);
const result = UserProfileAnalyticsUtils.trackUserProfileActivityAction({ action, display, activity, entry, stream, outbox: stateFromStores, voiceChannelId, analyticsLocations });
2026-07-20 16:05:17 +00:00
}, items1);
};