Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
69 lines
3.1 KiB
TypeScript
69 lines
3.1 KiB
TypeScript
// Module ID: 13140
|
|
// Function ID: 13141
|
|
// Name: UserProfileMutualGuilds
|
|
// Dependencies: [19, 17, 8312, 21, 4638, 8319, 12745, 13141, 4605, 12744, 1897, 7452, 5208, 12761, 5670, 4634, 12746, 2]
|
|
// Exports: default
|
|
|
|
// Module 13140 (UserProfileMutualGuilds)
|
|
import asyncRequireImpl from "asyncRequireImpl" /* 1897 */;
|
|
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4605 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const View = fn(17).View;
|
|
const UserProfileSections = fn(8312).UserProfileSections;
|
|
const jsxProd = fn(21);
|
|
({ jsx: hasOwnProperty, jsxs: metroRequire } = jsxProd);
|
|
const createStyles = fn(4638);
|
|
let closure_7 = createStyles.createStyles({ container: { flexDirection: "row", columnGap: 4, flexWrap: "wrap" }, section: { flexDirection: "row", alignItems: "center", columnGap: 6 } });
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/user_profile/native/UserProfileMutualGuilds.tsx");
|
|
|
|
export default function UserProfileMutualGuilds(user) {
|
|
user = user.user;
|
|
const tmp = closure_7();
|
|
const trackUserProfileAction = user(8319).useUserProfileAnalyticsContext().trackUserProfileAction;
|
|
const mutualGuilds = trackUserProfileAction(12745)(user).mutualGuilds;
|
|
if (trackUserProfileAction(13141)(user)) {
|
|
if (null != mutualGuilds) {
|
|
if (0 !== mutualGuilds.length) {
|
|
const substr = mutualGuilds.slice(0, 3);
|
|
const mapped = substr.map((guild) => guild.guild);
|
|
const obj2 = { style: tmp.container, children: null };
|
|
const obj3 = {
|
|
style: tmp.section,
|
|
accessibilityRole: "button",
|
|
onPress() {
|
|
trackUserProfileAction({ action: "PRESS_SECTION", section: UserProfileSections.MUTUAL_GUILDS });
|
|
ActionSheetActionCreatorsDefault.openLazy(asyncRequireImpl(12744, dependencyMap.paths), "UserProfileMutualGuildsActionSheet", {
|
|
user,
|
|
onPressMutualGuild(arg0) {
|
|
closure_1_1({ action: "PRESS_MUTUAL_GUILD" });
|
|
user(7452).transitionToGuild(arg0);
|
|
const obj = user(7452);
|
|
trackUserProfileAction(4605).hideAllActionSheets();
|
|
}
|
|
}, "stack");
|
|
},
|
|
children: null
|
|
};
|
|
const obj4 = {
|
|
size: tmp2(5670).GuildIconSizes.XXSMALL,
|
|
totalCount: mapped.length,
|
|
names: mapped.map((name) => name.name),
|
|
children: mapped.map((guild) => {
|
|
const obj = { guild, size: user(5670).GuildIconSizes.XXSMALL };
|
|
return closure_1_5(trackUserProfileAction(5670), obj, guild.id);
|
|
})
|
|
};
|
|
const items = [closure_5(tmp2(12761).GuildIconPile, obj4), ];
|
|
const obj5 = { variant: "text-sm/medium", color: "text-default", children: trackUserProfileAction(12746)(mutualGuilds.length) };
|
|
items[1] = closure_5(tmp2(4634).Text, obj5);
|
|
obj3.children = items;
|
|
obj2.children = closure_6(tmp2(5208).PressableOpacity, obj3);
|
|
return closure_5(View, obj2);
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
};
|