- Updated StripeProvider to retrieve priceId from session metadata instead of line items.
- Introduced credit package retrieval to include expiration information when adding credits.
- Enhanced logging to reflect credit expiration details during credit addition.
- Removed obsolete code related to priceId retrieval for improved clarity and maintainability.
- Added expireDays property to credit packages and related configurations in website.tsx for better management of credit expiration.
- Modified addCredits function to handle expireDays more flexibly, allowing for undefined values.
- Updated functions for adding register gift and monthly free credits to utilize the new expireDays configuration.
- Enhanced type definitions for credits to include optional expireDays for improved clarity.
- Removed obsolete creditExpireDays from the credits configuration to streamline the codebase.
- Updated DashboardSidebar to conditionally render SidebarMain based on loading state.
- Modified CreditPackages to trigger a refresh of credits data and show success toast with a delay to avoid React lifecycle conflicts.
- Added new credit checkout session functionality to facilitate credit purchases.
- Introduced credit package configurations in env.example for better management.
- Updated English and Chinese JSON files with new messages for checkout processes.
- Refactored existing components to utilize the new credit checkout session and streamline the credit purchasing workflow.
- Removed obsolete payment intent handling to simplify the codebase.
- Added credit expiration days, register gift credits, and free monthly credits options in website configuration.
- Updated credits handling functions to utilize the new configuration settings for improved flexibility and maintainability.
- Removed obsolete constants related to credits from constants.ts to streamline the codebase.
- Enhanced type definitions for credits configuration in index.d.ts for better clarity.
- Revised credit package descriptions in the English JSON file for clarity and consistency.
- Refactored CreditPackages component to utilize a more efficient method for retrieving credit packages.
- Removed obsolete functions and streamlined the code for better maintainability and performance.
- Added new credit packages structure in English and Chinese JSON files for better localization.
- Introduced server-side functions to retrieve credit packages and package details.
- Updated client-side components to utilize new credit package retrieval methods.
- Refactored existing code to enhance modularity and maintainability by separating client and server logic.
- Removed obsolete credit package retrieval functions to streamline the codebase.