Nux the prompt
This commit is contained in:
@@ -7,6 +7,7 @@ export enum Nux {
|
||||
ExploreInterestsCard = 'ExploreInterestsCard',
|
||||
InitialVerificationAnnouncement = 'InitialVerificationAnnouncement',
|
||||
ActivitySubscriptions = 'ActivitySubscriptions',
|
||||
AgeAssurancePrompt = 'AgeAssurancePrompt',
|
||||
}
|
||||
|
||||
export const nuxNames = new Set(Object.values(Nux))
|
||||
@@ -28,6 +29,10 @@ export type AppNux = BaseNux<
|
||||
id: Nux.ActivitySubscriptions
|
||||
data: undefined
|
||||
}
|
||||
| {
|
||||
id: Nux.AgeAssurancePrompt
|
||||
data: undefined
|
||||
}
|
||||
>
|
||||
|
||||
export const NuxSchemas: Record<Nux, zod.ZodObject<any> | undefined> = {
|
||||
@@ -35,4 +40,5 @@ export const NuxSchemas: Record<Nux, zod.ZodObject<any> | undefined> = {
|
||||
[Nux.ExploreInterestsCard]: undefined,
|
||||
[Nux.InitialVerificationAnnouncement]: undefined,
|
||||
[Nux.ActivitySubscriptions]: undefined,
|
||||
[Nux.AgeAssurancePrompt]: undefined,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {useMutation, useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {AppNux, Nux} from '#/state/queries/nuxs/definitions'
|
||||
import {type AppNux, type Nux} from '#/state/queries/nuxs/definitions'
|
||||
import {parseAppNux, serializeAppNux} from '#/state/queries/nuxs/util'
|
||||
import {
|
||||
preferencesQueryKey,
|
||||
@@ -40,6 +40,20 @@ export function useNuxs():
|
||||
}
|
||||
}
|
||||
|
||||
// if (__DEV__) {
|
||||
// const queryClient = useQueryClient()
|
||||
// const agent = useAgent()
|
||||
|
||||
// // @ts-ignore
|
||||
// window.clearNux = async (ids: string[]) => {
|
||||
// await agent.bskyAppRemoveNuxs(ids)
|
||||
// // triggers a refetch
|
||||
// await queryClient.invalidateQueries({
|
||||
// queryKey: preferencesQueryKey,
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
return {
|
||||
nuxs: undefined,
|
||||
status,
|
||||
|
||||
Reference in New Issue
Block a user