chore:little fixes and formating and linting and patches

This commit is contained in:
2026-03-31 15:50:54 +02:00
parent a1ce71ffb6
commit 9b197abcfa
815 changed files with 22960 additions and 8982 deletions

View File

@@ -1,5 +1,6 @@
// src/polar.ts
import { Polar } from '@polar-sh/sdk';
export {
validateEvent as validatePolarEvent,
WebhookVerificationError as PolarWebhookVerificationError,
@@ -33,11 +34,7 @@ export async function getProduct(id: string) {
return polar.products.get({ id });
}
export async function createPortal({
customerId,
}: {
customerId: string;
}) {
export async function createPortal({ customerId }: { customerId: string }) {
return polar.customerSessions.create({
customerId,
});
@@ -64,7 +61,7 @@ export async function createCheckout({
products: [productId],
successUrl: getSuccessUrl(
process.env.DASHBOARD_URL || process.env.NEXT_PUBLIC_DASHBOARD_URL!,
organizationId,
organizationId
),
customerEmail: user.email,
customerName: [user.firstName, user.lastName].filter(Boolean).join(' '),

View File

@@ -18,7 +18,7 @@ export type IPrice = {
};
export const PRICING: IPrice[] = [
{ price: 2.5, events: 5_000 },
{ price: 2.5, events: 5000 },
{ price: 5, events: 10_000 },
{ price: 20, events: 100_000 },
{ price: 30, events: 250_000, popular: true },
@@ -52,8 +52,8 @@ export function getRecommendedPlan<T>(
options: {
formattedEvents: string;
formattedPrice: string;
} & IPrice,
) => T,
} & IPrice
) => T
): T | undefined {
if (!monthlyEvents) {
return undefined;