mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 10:19:43 +00:00
feat(onboarding): skippable avatar with first-match prompt and usage-reason pack picks
Lets new users skip the onboarding avatar step and instead defers the ask to a lightweight, dismissible prompt shown once after the couple's first match. Also personalizes the home screen's first pack recommendation using the usage_reason already collected during onboarding, which now round-trips through GET /v1/me. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f22d4a3649
commit
fd8981fa28
14 files changed
+567
-77
No files matched your search
@@ -13,6 +13,7 @@ import { StreakDisplay } from '../../src/components/StreakDisplay';
|
||||
import { Events } from '../../src/lib/analytics';
|
||||
import { colors, spacing, typography } from '../../src/theme';
|
||||
import type { QuestionPack, Category } from '../../src/types';
|
||||
import { pickRecommendedPacks, RECOMMENDED_PACKS_LABEL } from '../../src/features/home/recommendedPacks';
|
||||
|
||||
const MAX_CONTENT_WIDTH = 600;
|
||||
|
||||
@@ -112,6 +113,13 @@ export default function DiscoveryScreen() {
|
||||
[packs, categories]
|
||||
);
|
||||
|
||||
// A small, cheap personalization: highlight packs that match what the user
|
||||
// said brought them to Sauci during onboarding, ahead of the full catalog.
|
||||
const recommendedPacks = useMemo(
|
||||
() => pickRecommendedPacks(packs, categories, user?.usage_reason ?? null),
|
||||
[packs, categories, user?.usage_reason]
|
||||
);
|
||||
|
||||
// Check if user has no packs enabled (empty state)
|
||||
const hasNoPacks = packs.length === 0;
|
||||
|
||||
@@ -169,6 +177,17 @@ export default function DiscoveryScreen() {
|
||||
{/* Quiz */}
|
||||
<QuizTile delay={225} />
|
||||
|
||||
{/* Personalized pick based on the onboarding usage reason */}
|
||||
{recommendedPacks.length > 0 && (
|
||||
<ContentRow
|
||||
title={RECOMMENDED_PACKS_LABEL}
|
||||
packs={recommendedPacks}
|
||||
isPremiumUser={isPremiumUser}
|
||||
delay={240}
|
||||
onShowPaywall={() => setShowPaywall(true)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Content Rows by Category */}
|
||||
{packsByCategory.map((group, index) => (
|
||||
<ContentRow
|
||||
|
||||
Reference in new issue
Block a user