decord/source/modules/user_profile/native/UserProfileUpsellButton.tsx

59 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-07-30 10:14:41 +00:00
// Module ID: 13689
// Function ID: 13690
2026-07-20 16:05:17 +00:00
// Name: UserProfileUpsellButton
2026-07-30 10:14:41 +00:00
// Dependencies: [19, 676, 1876, 21, 4189, 5515, 6238, 698, 4600, 6188, 1236, 6624, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-30 10:14:41 +00:00
// Module 13689 (UserProfileUpsellButton)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import ME from "ME";
import { PremiumUpsellTypes } from "GuildFeatures";
import { jsx } from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c4;
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ AnalyticsPages: c4, UpsellTypes: c5, AnalyticsSections: closure_6, AnalyticEvents: error } = ME);
let closure_10 = createCacheKey.createStyles({ nitroWheel: { marginRight: 2 } });
2026-07-23 10:11:24 +00:00
let result = require("GuildFeatures").fileFinishedImporting("modules/user_profile/native/UserProfileUpsellButton.tsx");
2026-07-20 16:05:17 +00:00
export default function UserProfileUpsellButton(analyticsObject) {
analyticsObject = analyticsObject.analyticsObject;
2026-07-29 08:29:29 +00:00
let analyticsLocations;
analyticsLocations = analyticsLocations(5515)().analyticsLocations;
2026-07-30 10:14:41 +00:00
let obj = analyticsObject(6238);
2026-07-29 08:29:29 +00:00
let label = obj.useNitroTrialCtaOverride("user_profile_upsell_button");
2026-07-20 16:05:17 +00:00
const items = [analyticsLocations, analyticsObject];
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
let obj = analyticsLocations(outer1_2[7]);
obj = { type: outer1_8.CUSTOM_PROFILE_SETTINGS_BANNER_BUTTON, location: obj, location_stack: analyticsLocations };
obj = { page: outer1_4.USER_SETTINGS, section: outer1_6.USER_PROFILE, object: analyticsObject };
obj.track(outer1_7.PREMIUM_UPSELL_VIEWED, obj);
2026-07-20 16:05:17 +00:00
}, items);
obj = {
onPress() {
2026-07-23 10:11:24 +00:00
let obj = analyticsLocations(outer1_2[9]);
obj = { initialUpsellKey: outer1_5.CUSTOM_PROFILES, analyticsLocation: obj, analyticsLocations, analyticsProperties: obj1 };
obj = { page: outer1_4.USER_SETTINGS, section: outer1_6.USER_PROFILE, object: analyticsObject };
2026-07-20 16:05:17 +00:00
const result = obj.handleShowUpsellAlert(obj);
},
2026-07-29 08:29:29 +00:00
variant: "active",
text: null,
icon: null
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
if (label == null) {
label = analyticsObject.label;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (label == null) {
const intl = tmp3(1236).intl;
label = intl.string(tmp3(1236).t.pj0XBN);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = label;
2026-07-23 10:11:24 +00:00
obj = { color: "white", size: "sm", style: callback().nitroWheel };
2026-07-30 10:14:41 +00:00
obj[3] = jsx(analyticsObject(6624).NitroWheelIcon, { color: "white", size: "sm", style: callback().nitroWheel });
2026-07-29 08:29:29 +00:00
return jsx(analyticsObject(4600).Button, { color: "white", size: "sm", style: callback().nitroWheel });
2026-07-20 16:05:17 +00:00
};