From edaf230612f688512c71a66a99742e558620ebd3 Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 16 Nov 2024 21:39:47 +0000 Subject: Remove typography NUX and consistently call upsertProfile (#6424) * Make profile upsert unconditional * Remove Typography NUX * Early exit NUXes on unknown creation date * Clarify via comment --- src/components/dialogs/nuxs/index.tsx | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'src/components/dialogs/nuxs/index.tsx') diff --git a/src/components/dialogs/nuxs/index.tsx b/src/components/dialogs/nuxs/index.tsx index d17615aeb..701ae84e6 100644 --- a/src/components/dialogs/nuxs/index.tsx +++ b/src/components/dialogs/nuxs/index.tsx @@ -19,7 +19,6 @@ import {useOnboardingState} from '#/state/shell' /* * NUXs */ -import {NeueTypography} from '#/components/dialogs/nuxs/NeueTypography' import {isSnoozed, snooze, unsnooze} from '#/components/dialogs/nuxs/snoozing' import {IS_DEV} from '#/env' @@ -36,19 +35,7 @@ const queuedNuxs: { currentProfile: AppBskyActorDefs.ProfileViewDetailed preferences: UsePreferencesQueryResponse }) => boolean -}[] = [ - { - id: Nux.NeueTypography, - enabled(props) { - if (props.currentProfile.createdAt) { - if (new Date(props.currentProfile.createdAt) < new Date('2024-10-09')) { - return true - } - } - return false - }, - }, -] +}[] = [] const Context = React.createContext({ activeNux: undefined, @@ -66,7 +53,14 @@ export function NuxDialogs() { const onboardingActive = useOnboardingState().isActive const isLoading = - !currentAccount || !preferences || !profile || onboardingActive + onboardingActive || + !currentAccount || + !preferences || + !profile || + // Profile isn't legit ready until createdAt is a real date. + !profile.createdAt || + profile.createdAt === '0001-01-01T00:00:00.000Z' // TODO: Fix this in AppView. + return !isLoading ? ( - {activeNux === Nux.NeueTypography && } + {/*For example, activeNux === Nux.NeueTypography && */} ) } -- cgit 1.4.1