decord/alpha/source/modules/user_profile/PrivateProfilesExperiment.tsx

40 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 13482
// Function ID: 13483
// Name: PrivateProfilesExperiment
// Dependencies: [1434, 13483, 13484, 2]
2026-07-20 16:05:17 +00:00
// Exports: getIsInPrivateProfilesExperiment, useIsInPrivateProfilesExperiment
// Module 13482 (PrivateProfilesExperiment)
import PrivateProfilesStrictExperiment from "PrivateProfilesStrictExperiment" /* 13483 */;
import PrivateProfilesStrictGbExperiment from "PrivateProfilesStrictGbExperiment" /* 13484 */;
import ApexExperiment from "ApexExperiment" /* 1434 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const apexExperiment = ApexExperiment.createApexExperiment({ name: "2026-02-private-profiles", kind: "user", defaultConfig: { enabled: false }, variations: { 0: { enabled: false }, 1: { enabled: true } } });
const result = size.fileFinishedImporting("modules/user_profile/PrivateProfilesExperiment.tsx");
2026-07-20 16:05:17 +00:00
export const PrivateProfilesExperiment = apexExperiment;
2026-07-29 08:29:29 +00:00
export const useIsInPrivateProfilesExperiment = function useIsInPrivateProfilesExperiment(UserProfilePrivacyNotice) {
let enabled = apexExperiment.useConfig({ location: UserProfilePrivacyNotice }).enabled;
const isInPrivateProfilesStrictExperiment = PrivateProfilesStrictExperiment.useIsInPrivateProfilesStrictExperiment(UserProfilePrivacyNotice);
2026-07-29 08:29:29 +00:00
const obj = { location: UserProfilePrivacyNotice };
const isInPrivateProfilesStrictGbExperiment = PrivateProfilesStrictGbExperiment.useIsInPrivateProfilesStrictGbExperiment(UserProfilePrivacyNotice);
2026-07-20 16:05:17 +00:00
if (!enabled) {
enabled = isInPrivateProfilesStrictExperiment;
}
if (!enabled) {
enabled = isInPrivateProfilesStrictGbExperiment;
}
return enabled;
};
export const getIsInPrivateProfilesExperiment = function getIsInPrivateProfilesExperiment(ProfilePrivacySetting) {
let enabled = apexExperiment.getConfig({ location: ProfilePrivacySetting }).enabled;
if (!enabled) {
enabled = PrivateProfilesStrictExperiment.getIsInPrivateProfilesStrictExperiment(ProfilePrivacySetting);
2026-07-20 16:05:17 +00:00
}
if (!enabled) {
enabled = PrivateProfilesStrictGbExperiment.getIsInPrivateProfilesStrictGbExperiment(ProfilePrivacySetting);
2026-07-20 16:05:17 +00:00
}
return enabled;
};