mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-19 18:35:18 +02:00
update billing types
This commit is contained in:
parent
219d4c7901
commit
b49e14fdf8
9 changed files with 37 additions and 26 deletions
|
|
@ -8,7 +8,6 @@ import { z } from "zod";
|
|||
import { tokens } from "@/app/styles/design-tokens";
|
||||
import { SectionHeading } from "@/components/ui/section-heading";
|
||||
import { HorizontalDivider } from "@/components/ui/horizontal-divider";
|
||||
import { WithStringId } from "@/app/lib/types/types";
|
||||
import clsx from 'clsx';
|
||||
import { getCustomerPortalUrl } from "../actions/billing.actions";
|
||||
import { useState } from "react";
|
||||
|
|
@ -31,7 +30,7 @@ const planDetails = {
|
|||
};
|
||||
|
||||
interface BillingPageProps {
|
||||
customer: WithStringId<z.infer<typeof Customer>>;
|
||||
customer: z.infer<typeof Customer>;
|
||||
usage: z.infer<typeof UsageResponse>;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export default async function Page(
|
|||
) {
|
||||
const searchParams = await props.searchParams;
|
||||
const customer = await requireBillingCustomer();
|
||||
await syncWithStripe(customer._id);
|
||||
await syncWithStripe(customer.id);
|
||||
const redirectUrl = searchParams.redirect as string;
|
||||
redirect(redirectUrl || '/projects');
|
||||
}
|
||||
|
|
@ -12,6 +12,6 @@ export default async function Page() {
|
|||
}
|
||||
|
||||
const customer = await requireBillingCustomer();
|
||||
const usage = await getUsage(customer._id);
|
||||
const usage = await getUsage(customer.id);
|
||||
return <BillingPage customer={customer} usage={usage} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue