Skip to content

Commit c878675

Browse files
committed
chore: update yarn.lock and enhance animated gradient background
- Updated yarn.lock to reflect changes in package versions and workspace references. - Refactored fetch-price-details.ts to create a unique cache key based on Stripe price IDs. - Introduced AnimatedGradientBackgroundWrapper component to manage scale based on onboarding progress. - Enhanced AnimatedGradientBackground with improved shader effects and removed unused mouse influence logic. - Adjusted layout components to integrate the new animated background and improve user experience during onboarding.
1 parent 101dff3 commit c878675

8 files changed

Lines changed: 325 additions & 289 deletions

File tree

apps/app/src/actions/stripe/fetch-price-details.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ export type CachedPrices = {
2222
const CACHE_DURATION = 30 * 60; // 30 minutes in seconds
2323

2424
export async function fetchStripePriceDetails(): Promise<CachedPrices> {
25-
const cacheKey = 'stripe:managed-prices';
25+
// Fetch from Stripe
26+
const monthlyPriceId = env.NEXT_PUBLIC_STRIPE_SUBSCRIPTION_MANAGED_MONTHLY_PRICE_ID;
27+
const yearlyPriceId = env.NEXT_PUBLIC_STRIPE_SUBSCRIPTION_MANAGED_YEARLY_PRICE_ID;
28+
29+
// Create a unique cache key that includes the price IDs
30+
const cacheKey = `stripe:managed-prices:${monthlyPriceId || 'none'}:${yearlyPriceId || 'none'}`;
2631

2732
try {
2833
// Check cache first
@@ -34,10 +39,6 @@ export async function fetchStripePriceDetails(): Promise<CachedPrices> {
3439
console.error('[STRIPE] Error reading from cache:', error);
3540
}
3641

37-
// Fetch from Stripe
38-
const monthlyPriceId = env.NEXT_PUBLIC_STRIPE_SUBSCRIPTION_MANAGED_MONTHLY_PRICE_ID;
39-
const yearlyPriceId = env.NEXT_PUBLIC_STRIPE_SUBSCRIPTION_MANAGED_YEARLY_PRICE_ID;
40-
4142
let monthlyPrice: PriceDetails | null = null;
4243
let yearlyPrice: PriceDetails | null = null;
4344

0 commit comments

Comments
 (0)