Skip to content

Commit

Permalink
Nux after onboarding (bluesky-social#5357)
Browse files Browse the repository at this point in the history
* Don't show nux dialogs until post-onboarding

* Don't show if over 10M
  • Loading branch information
estrattonbailey authored Sep 15, 2024
1 parent d6c11a7 commit 61deab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/dialogs/nuxs/TenMillion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function TenMillion() {

const data = await res.json()

if (data.number) {
if (data.number && data.number <= 10_000_000) {
setUserNumber(data.number)
} else {
// should be rare
Expand Down
4 changes: 3 additions & 1 deletion src/components/dialogs/nuxs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
useUpsertNuxMutation,
} from '#/state/queries/nuxs'
import {useSession} from '#/state/session'
import {useOnboardingState} from '#/state/shell'
import {isSnoozed, snooze, unsnooze} from '#/components/dialogs/nuxs/snoozing'
import {TenMillion} from '#/components/dialogs/nuxs/TenMillion'
import {IS_DEV} from '#/env'
Expand Down Expand Up @@ -57,7 +58,8 @@ export function useNuxDialogContext() {

export function NuxDialogs() {
const {hasSession} = useSession()
return hasSession ? <Inner /> : null
const onboardingState = useOnboardingState()
return hasSession && !onboardingState.isActive ? <Inner /> : null
}

function Inner() {
Expand Down

0 comments on commit 61deab7

Please sign in to comment.