Nux after onboarding (#5357)
* Don't show nux dialogs until post-onboarding * Don't show if over 10Mzio/dev^2
parent
d6c11a7231
commit
61deab7051
|
@ -115,7 +115,7 @@ export function TenMillion() {
|
||||||
|
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
|
|
||||||
if (data.number) {
|
if (data.number && data.number <= 10_000_000) {
|
||||||
setUserNumber(data.number)
|
setUserNumber(data.number)
|
||||||
} else {
|
} else {
|
||||||
// should be rare
|
// should be rare
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {
|
||||||
useUpsertNuxMutation,
|
useUpsertNuxMutation,
|
||||||
} from '#/state/queries/nuxs'
|
} from '#/state/queries/nuxs'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
|
import {useOnboardingState} from '#/state/shell'
|
||||||
import {isSnoozed, snooze, unsnooze} from '#/components/dialogs/nuxs/snoozing'
|
import {isSnoozed, snooze, unsnooze} from '#/components/dialogs/nuxs/snoozing'
|
||||||
import {TenMillion} from '#/components/dialogs/nuxs/TenMillion'
|
import {TenMillion} from '#/components/dialogs/nuxs/TenMillion'
|
||||||
import {IS_DEV} from '#/env'
|
import {IS_DEV} from '#/env'
|
||||||
|
@ -57,7 +58,8 @@ export function useNuxDialogContext() {
|
||||||
|
|
||||||
export function NuxDialogs() {
|
export function NuxDialogs() {
|
||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
return hasSession ? <Inner /> : null
|
const onboardingState = useOnboardingState()
|
||||||
|
return hasSession && !onboardingState.isActive ? <Inner /> : null
|
||||||
}
|
}
|
||||||
|
|
||||||
function Inner() {
|
function Inner() {
|
||||||
|
|
Loading…
Reference in New Issue