Update package versions and optimize URL generation
Updated the versions of several packages including pino and pnpm. Also, the generation of URLs in the pricing-table.tsx file has been optimized by implementing URLSearchParams. A new global error page was also added.
This commit is contained in:
@@ -426,20 +426,18 @@ function DefaultCheckoutButton(
|
||||
highlighted?: boolean;
|
||||
}>,
|
||||
) {
|
||||
const redirectToCheckoutParam = props.redirectToCheckout
|
||||
? '?redirectToCheckout=true'
|
||||
: '';
|
||||
|
||||
const { t } = useTranslation('billing');
|
||||
|
||||
const planId = props.plan.id;
|
||||
const signUpPath = props.paths.signUp;
|
||||
const subscriptionPath = props.paths.subscription;
|
||||
|
||||
const searchParams = new URLSearchParams({
|
||||
next: props.paths.subscription,
|
||||
plan: props.plan.id,
|
||||
redirectToCheckout: props.redirectToCheckout ? 'true' : 'false',
|
||||
});
|
||||
|
||||
const linkHref =
|
||||
props.plan.href ??
|
||||
`${signUpPath}?plan=${planId}&next=${subscriptionPath}?plan=${planId}${redirectToCheckoutParam}` ??
|
||||
'';
|
||||
props.plan.href ?? `${signUpPath}?${searchParams.toString()}` ?? '';
|
||||
|
||||
const label = props.plan.buttonLabel ?? 'common:getStartedWithPlan';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user