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:
giancarlo
2024-05-13 21:47:51 +07:00
parent a75009c0df
commit 9d30039ba8
6 changed files with 100 additions and 34 deletions

View File

@@ -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';

View File

@@ -16,7 +16,7 @@
"./instrumentation": "./src/instrumentation.ts",
"./config/client": "./src/config/sentry.client.config.ts",
"./config/server": "./src/config/sentry.server.config.ts",
"./config/edge": "./src/config/sentry.server.edge.ts"
"./config/edge": "./src/config/sentry.edge.config.ts"
},
"dependencies": {
"@opentelemetry/resources": "1.24.1",

View File

@@ -22,7 +22,7 @@
"@tanstack/react-table": "^8.17.0"
},
"dependencies": {
"pino": "^9.0.0"
"pino": "^9.1.0"
},
"eslintConfig": {
"root": true,