feat: dashboard v2, esm, upgrades (#211)
* esm * wip * wip * wip * wip * wip * wip * subscription notice * wip * wip * wip * fix envs * fix: update docker build * fix * esm/types * delete dashboard :D * add patches to dockerfiles * update packages + catalogs + ts * wip * remove native libs * ts * improvements * fix redirects and fetching session * try fix favicon * fixes * fix * order and resize reportds within a dashboard * improvements * wip * added userjot to dashboard * fix * add op * wip * different cache key * improve date picker * fix table * event details loading * redo onboarding completely * fix login * fix * fix * extend session, billing and improve bars * fix * reduce price on 10M
This commit is contained in:
committed by
GitHub
parent
436e81ecc9
commit
81a7e5d62e
@@ -50,13 +50,13 @@ export async function createPortal({
|
||||
}
|
||||
|
||||
export async function createCheckout({
|
||||
priceId,
|
||||
productId,
|
||||
organizationId,
|
||||
projectId,
|
||||
user,
|
||||
ipAddress,
|
||||
}: {
|
||||
priceId: string;
|
||||
productId: string;
|
||||
organizationId: string;
|
||||
projectId?: string;
|
||||
user: {
|
||||
@@ -68,9 +68,10 @@ export async function createCheckout({
|
||||
ipAddress: string;
|
||||
}) {
|
||||
return polar.checkouts.create({
|
||||
productPriceId: priceId,
|
||||
// productPriceId: priceId,
|
||||
products: [productId],
|
||||
successUrl: getSuccessUrl(
|
||||
process.env.NEXT_PUBLIC_DASHBOARD_URL!,
|
||||
process.env.DASHBOARD_URL || process.env.NEXT_PUBLIC_DASHBOARD_URL!,
|
||||
organizationId,
|
||||
projectId,
|
||||
),
|
||||
@@ -90,7 +91,6 @@ export async function cancelSubscription(subscriptionId: string) {
|
||||
id: subscriptionId,
|
||||
subscriptionUpdate: {
|
||||
cancelAtPeriodEnd: true,
|
||||
revoke: null,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -110,7 +110,6 @@ export function reactivateSubscription(subscriptionId: string) {
|
||||
id: subscriptionId,
|
||||
subscriptionUpdate: {
|
||||
cancelAtPeriodEnd: false,
|
||||
revoke: null,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export const PRICING: IPrice[] = [
|
||||
},
|
||||
{ price: 180, events: 2_500_000 },
|
||||
{ price: 250, events: 5_000_000 },
|
||||
{ price: 400, events: 10_000_000 },
|
||||
{ price: 300, events: 10_000_000 },
|
||||
];
|
||||
|
||||
export const FREE_PRODUCT_IDS = [
|
||||
|
||||
Reference in New Issue
Block a user