Update UI, improve E2E tests and modify trial period configuration
The code changes incorporate UI updates for better usability and user experience. E2E test scripts(in `user-billing.spec.ts` and `team-billing.spec.ts`) were also updated for improved efficiency and accuracy, primarily replacing 'Active' status check with 'Trial'. Changes have been made in the trialDays configuration, with the term 'trialPeriod' now replaced by 'trialDays' across different components. Notably, a new error handling case is included in `lemon-squeezy-billing-strategy.service.ts` for failed subscription cancellation attempts.
This commit is contained in:
@@ -8,6 +8,7 @@ import { Alert, AlertDescription, AlertTitle } from '@kit/ui/alert';
|
||||
import { If } from '@kit/ui/if';
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
import { cn } from '@kit/ui/utils';
|
||||
|
||||
import { createBillingPortalSession } from '~/(dashboard)/home/[account]/billing/server-actions';
|
||||
import billingConfig from '~/config/billing.config';
|
||||
@@ -75,13 +76,17 @@ async function TeamAccountBillingPage({ params }: Params) {
|
||||
/>
|
||||
|
||||
<PageBody>
|
||||
<div className={'mx-auto flex w-full max-w-2xl flex-col space-y-6'}>
|
||||
<div
|
||||
className={cn(`flex w-full flex-col space-y-6`, {
|
||||
'mx-auto max-w-2xl ': subscription,
|
||||
})}
|
||||
>
|
||||
<If
|
||||
condition={subscription}
|
||||
fallback={
|
||||
<>
|
||||
<div>
|
||||
<Checkout />
|
||||
</>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{(subscription) => (
|
||||
|
||||
Reference in New Issue
Block a user