mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-01 18:19:43 +00:00
Add question types, nudge feature, and share modal
- Add new question card components (photo, audio, text, who-likely) - Add share preview modal for matches - Add nudge notification system with rate limiting - Add session-based notification improvements - Add match confetti celebration animation - Update onboarding flow with paywall tracking - Remove deprecated swipe card and tutorial components - Update GlassCard/GlassInput to use solid backgrounds - Fix routing issues after packs screen removal
This commit is contained in:
1 parent
8612b16b93
commit
1daf386765
114 files changed
+14877
-7911
No files matched your search
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Required onboarding version.
|
||||
*
|
||||
* Bump this number when you need existing users to go through onboarding again
|
||||
* to collect new required data (e.g., profile pictures, new fields).
|
||||
*
|
||||
* Version history:
|
||||
* - 1: Initial onboarding (avatar, name, gender, purpose, content prefs, notifications)
|
||||
* - 2: Made avatar mandatory for all users
|
||||
*/
|
||||
export const REQUIRED_ONBOARDING_VERSION = 2;
|
||||
|
||||
/**
|
||||
* RevenueCat offering identifier for the onboarding discount paywall.
|
||||
*
|
||||
* Create this offering in RevenueCat dashboard with discounted products.
|
||||
* If the offering doesn't exist, the paywall will fall back to the default offering.
|
||||
*
|
||||
* To set up:
|
||||
* 1. Create discounted products in App Store Connect (e.g., "sauci_annual_onboarding")
|
||||
* 2. In RevenueCat → Products, add these products
|
||||
* 3. In RevenueCat → Offerings, create offering "onboarding_promo" with the discounted products
|
||||
*/
|
||||
export const ONBOARDING_OFFERING_ID = "onboarding_promo";
|
||||
|
||||
/**
|
||||
* Check if a user needs to complete onboarding based on their current version
|
||||
*/
|
||||
export function needsOnboarding(
|
||||
onboardingCompleted: boolean | undefined,
|
||||
onboardingVersion: number | undefined
|
||||
): boolean {
|
||||
// Never completed onboarding
|
||||
if (!onboardingCompleted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Completed an older version - need to re-onboard
|
||||
if ((onboardingVersion ?? 0) < REQUIRED_ONBOARDING_VERSION) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in new issue
Block a user