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

70 lines
3.1 KiB
TypeScript
Raw Normal View History

// Module ID: 12925
// Function ID: 12926
2026-07-20 16:05:17 +00:00
// Name: UserProfileMutualGuilds
// Dependencies: [19, 17, 8114, 21, 4481, 8121, 12534, 12926, 4448, 12533, 2008, 7280, 5084, 12550, 5539, 4477, 12535, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 12925 (UserProfileMutualGuilds)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import { UserProfileSections } from "USER_PROFILE_TOOLTIP_DELAY" /* 8114 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4481 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
let closure_7 = createCacheKey.createStyles({ container: { flexDirection: "row", columnGap: 4, flexWrap: "wrap" }, section: { flexDirection: "row", alignItems: "center", columnGap: 6 } });
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileMutualGuilds.tsx");
2026-07-20 16:05:17 +00:00
export default function UserProfileMutualGuilds(user) {
user = user.user;
2026-07-29 08:29:29 +00:00
let trackUserProfileAction;
2026-07-20 16:05:17 +00:00
const tmp = callback3();
let obj = user(8121);
2026-07-29 08:29:29 +00:00
trackUserProfileAction = obj.useUserProfileAnalyticsContext().trackUserProfileAction;
const mutualGuilds = trackUserProfileAction(12534)(user).mutualGuilds;
if (trackUserProfileAction(12926)(user)) {
2026-07-20 16:05:17 +00:00
if (null != mutualGuilds) {
if (0 !== mutualGuilds.length) {
const substr = mutualGuilds.slice(0, 3);
const mapped = substr.map((guild) => guild.guild);
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp.container;
obj = { style: null, accessibilityRole: "button", onPress: null, children: null };
obj[0] = tmp.section;
obj[2] = function onPress() {
2026-08-24 06:08:38 +00:00
let obj = { action: "PRESS_SECTION", section: closure_1_4.MUTUAL_GUILDS };
2026-07-29 08:29:29 +00:00
trackUserProfileAction(obj);
obj = {
user,
onPressMutualGuild(arg0) {
callback({ action: "PRESS_MUTUAL_GUILD" });
2026-08-24 06:08:38 +00:00
closure_1_0(closure_1_2[11]).transitionToGuild(arg0);
const obj = closure_1_0(closure_1_2[11]);
2026-08-26 06:04:24 +00:00
closure_1_1(closure_1_2[8]).hideAllActionSheets();
2026-07-29 08:29:29 +00:00
}
};
2026-08-24 06:08:38 +00:00
trackUserProfileAction(closure_1_2[8]).openLazy(user(closure_1_2[10])(closure_1_2[9], closure_1_2.paths), "UserProfileMutualGuildsActionSheet", obj, "stack");
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
obj1 = { size: null, totalCount: null, names: null, children: null };
obj1[0] = tmp2(5539).GuildIconSizes.XXSMALL;
2026-07-29 08:29:29 +00:00
obj1[1] = mapped.length;
obj1[2] = mapped.map((name) => name.name);
obj1[3] = mapped.map((guild) => {
const obj = { guild, size: user(5539).GuildIconSizes.XXSMALL };
return callback(trackUserProfileAction(5539), obj, guild.id);
2026-07-29 08:29:29 +00:00
});
const items = [callback(tmp2(12550).GuildIconPile, obj1), ];
2026-08-26 06:04:24 +00:00
const obj2 = { variant: "text-sm/medium", color: "text-default", children: null };
obj2[2] = trackUserProfileAction(12535)(mutualGuilds.length);
items[1] = callback(tmp2(4477).Text, obj2);
2026-07-29 08:29:29 +00:00
obj[3] = items;
obj[1] = callback2(tmp2(5084).PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
return callback(View, obj);
}
}
}
return null;
};