Feature/payment - #166
Feature/payment#166
Conversation
- Added useActivePlan hook to manage user's active subscription plan - Integrated subscription plans with dynamic pricing and user entitlements - Enhanced checkout process with error handling and subscription management - Updated UI components to reflect active plan status and pricing - Refactored constants and plans structure for better maintainability Co-authored-by: Copilot <copilot@github.com>
* [feat] camera flip & delayed icebreaker fade-in #161 * [fix] fix camera flip freeze by forcing RTCView remount #161 * [fix] save video producer ref for replaceTrack on camera flip #161 * [feat] draggable local camera preview #161 * [feat] tap to toggle controls & icebreaker skeleton loader #161 * [feat] smooth fade animation for controls toggle #161 * [fix] sync local preview bottom animation with controls fade #161 * [fix] videocall fullscreen added (#162) * [fix] backbutton --------- Co-authored-by: GRuoss <gregoryruoss@gmail.com> Co-authored-by: Copilot <copilot@github.com>
- Simplified ProtectedLayout by removing unused imports and offline status handling. - Updated Stack.Screen options for datePickerModal. - Deleted InfoScreen component and its associated styles. - Enhanced Checkout and SubscriptionPlans components to utilize PurchasesContext for better state management. - Added streak celebration modal to VideoCall component for user engagement. - Introduced PurchasesContext to manage purchases readiness across the app. - Reimplemented DatePickerModal in the protected directory. - Improved server status checking with network connectivity awareness.
…chat, favorites, and personal details screens Co-authored-by: Copilot <copilot@github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (41)
📝 WalkthroughWalkthroughThis PR introduces comprehensive in-app purchase integration with RevenueCat, adds network connectivity detection, refactors the video call flow into modular components, and enhances user settings management with secure password changes and personal details editing. Changes
Sequence Diagram(s)sequenceDiagram
participant App as App Root Layout
participant Network as Network Service
participant NoInternet as NoInternetScreen
participant Content as App Content
App->>Network: Check connectivity on mount
Network-->>App: Network state
alt Connected
App->>Content: Render protected/auth routes
else Disconnected
App->>NoInternet: Render offline screen
end
Network->>App: Emit connectivity changes
alt Still Disconnected
App->>NoInternet: Keep showing offline
else Reconnected
App->>Content: Transition to normal flow
end
sequenceDiagram
participant User as User
participant Login as Login Screen
participant Backend as Backend API
participant Purchases as RevenueCat SDK
participant Router as Navigation Router
User->>Login: Submit login (email/phone)
Login->>Backend: POST login credentials
Backend-->>Login: { token, userId }
Login->>Login: Save token locally
alt Purchases SDK Configured
Login->>Purchases: Purchases.logIn(userId)
Purchases-->>Login: Subscription info
end
Login->>Router: Navigate to protected tabs
sequenceDiagram
participant SubscriptionScreen as Subscriptions Screen
participant Purchases as RevenueCat SDK
participant PurchaseContext as PurchasesContext
participant Checkout as Checkout Screen
SubscriptionScreen->>PurchaseContext: Check if purchases ready
PurchaseContext-->>SubscriptionScreen: Ready status
alt Purchases Ready
SubscriptionScreen->>Purchases: Fetch offerings
Purchases-->>SubscriptionScreen: Plan pricing & availability
SubscriptionScreen->>Purchases: Get customer info
Purchases-->>SubscriptionScreen: Active entitlements
SubscriptionScreen->>SubscriptionScreen: Render plans with active status
User->>Checkout: Select plan to purchase
Checkout->>Purchases: Initiate purchase
Purchases-->>Checkout: Purchase result
alt Success
Checkout->>Purchases: Verify entitlement
Checkout->>Router: Navigate to tabs
else Failure
Checkout->>Checkout: Show error message
end
else Not Ready
SubscriptionScreen->>SubscriptionScreen: Show loading indicator
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
…into feature/payment
Kush-Srigiri
left a comment
There was a problem hiding this comment.
very good but could be better
Summary by CodeRabbit
New Features
Improvements