decord/source/modules/calls/native/useProfileTileGradient.tsx

45 lines
1.6 KiB
TypeScript
Raw Normal View History

// Module ID: 8379
// Function ID: 8380
2026-08-25 06:04:03 +00:00
// Name: useProfileTileGradient
// Dependencies: [32, 19, 8315, 8380, 8316, 8381, 2]
2026-08-25 06:04:03 +00:00
// Exports: default
// Module 8379 (useProfileTileGradient)
import maybeFetchUserProfileDefault from "maybeFetchUserProfile" /* 8316 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
2026-08-25 06:04:03 +00:00
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/calls/native/useProfileTileGradient.tsx");
2026-08-25 06:04:03 +00:00
export default function useProfileTileGradient(userId) {
userId = userId.userId;
const guildId = userId.guildId;
let isVideoBackgroundProfileFetchEnabled;
let tmp2 = guildId(isVideoBackgroundProfileFetchEnabled[2])(userId, guildId);
2026-08-31 15:47:37 +00:00
let themeColors;
if (tmp2 != null) {
themeColors = tmp2.themeColors;
2026-08-25 06:04:03 +00:00
}
2026-08-31 15:47:37 +00:00
if (themeColors == null) {
themeColors = [];
2026-08-25 06:04:03 +00:00
}
[tmp5, tmp6] = themeColors;
const tmp3Result = _slicedToArray(themeColors, 2);
isVideoBackgroundProfileFetchEnabled = userId(isVideoBackgroundProfileFetchEnabled[3]).useIsVideoBackgroundProfileFetchEnabled(userId.location);
const items = [isVideoBackgroundProfileFetchEnabled, userId, guildId];
const effect = noop.useEffect(() => {
let tmp2 = null != userId;
if (tmp2) {
tmp2 = isVideoBackgroundProfileFetchEnabled;
}
if (tmp2) {
const obj = { guildId, dispatchWait: true };
maybeFetchUserProfileDefault(userId, undefined, obj);
2026-08-25 06:04:03 +00:00
}
2026-08-31 15:47:37 +00:00
}, items);
let obj = userId(isVideoBackgroundProfileFetchEnabled[3]);
return userId(isVideoBackgroundProfileFetchEnabled[5]).useVideoTileGradientColors(tmp5, tmp6);
2026-08-25 06:04:03 +00:00
};