Add setting for opting in to beta features (#11123)

This commit is contained in:
DS Boyce
2026-07-15 06:06:54 -07:00
committed by GitHub
parent d7f40b7e7f
commit 3c5c11c002
20 changed files with 685 additions and 90 deletions
+1
View File
@@ -50,6 +50,7 @@ export const DEFAULT_LOGGED_OUT_PREFERENCES: UsePreferencesQueryResponse = {
queuedNudges: [],
activeProgressGuide: undefined,
nuxs: [],
isBetaUser: undefined,
},
postInteractionSettings: {
threadgateAllowRules: undefined,
+15
View File
@@ -438,6 +438,21 @@ export function useSetActiveProgressGuideMutation() {
})
}
export function useSetIsBetaUserMutation() {
const queryClient = useQueryClient()
const agent = useAgent()
return useMutation({
mutationFn: async (isBetaUser: boolean) => {
await agent.setIsBetaUser(isBetaUser)
// triggers a refetch
await queryClient.invalidateQueries({
queryKey: preferencesQueryKey,
})
},
})
}
export function useSetVerificationPrefsMutation() {
const ax = useAnalytics()
const queryClient = useQueryClient()