mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): gate blocked group rendering behind an experiment (#2763)
This commit is contained in:
1 parent
4b278a0da8
commit
ed10f9d323
22 files changed
+938
-30
No files matched your search
@@ -4,6 +4,10 @@ import {
|
||||
INERT_VOICE_NOISE_SUPPRESSION_ASSIGNMENT,
|
||||
VoiceNoiseSuppressionAssignmentResponse,
|
||||
} from '@fluxer/schema/src/domains/admin/VoiceNoiseSuppressionSchemas';
|
||||
import {
|
||||
BlockedMessageGroupsAssignmentResponse,
|
||||
INERT_BLOCKED_MESSAGE_GROUPS_ASSIGNMENT,
|
||||
} from '@fluxer/schema/src/domains/experiment/BlockedMessageGroupsSchemas';
|
||||
import {
|
||||
INERT_MESSAGE_HOVER_TRACKING_ASSIGNMENT,
|
||||
MessageHoverTrackingAssignmentResponse,
|
||||
@@ -52,6 +56,7 @@ const ExperimentAssignmentsSchema = z.object({
|
||||
voice_noise_suppression: VoiceNoiseSuppressionAssignmentResponse.optional(),
|
||||
message_hover_tracking: MessageHoverTrackingAssignmentResponse.optional(),
|
||||
message_keyboard_focus: MessageKeyboardFocusAssignmentResponse.optional(),
|
||||
blocked_message_groups: BlockedMessageGroupsAssignmentResponse.optional(),
|
||||
});
|
||||
|
||||
export const ExperimentAssignmentsResponse = z.object({
|
||||
@@ -85,3 +90,9 @@ export function readMessageKeyboardFocusAssignment(
|
||||
): MessageKeyboardFocusAssignmentResponse {
|
||||
return response.assignments.message_keyboard_focus ?? INERT_MESSAGE_KEYBOARD_FOCUS_ASSIGNMENT;
|
||||
}
|
||||
|
||||
export function readBlockedMessageGroupsAssignment(
|
||||
response: ExperimentAssignmentsResponse,
|
||||
): BlockedMessageGroupsAssignmentResponse {
|
||||
return response.assignments.blocked_message_groups ?? INERT_BLOCKED_MESSAGE_GROUPS_ASSIGNMENT;
|
||||
}
|
||||
Reference in new issue
Block a user