mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-07 22:32:39 +02:00
17 lines
No EOL
540 B
TypeScript
17 lines
No EOL
540 B
TypeScript
import { requireBillingCustomer } from '../lib/billing';
|
|
import { BillingPage } from './app';
|
|
import { getUsage } from '../lib/billing';
|
|
import { redirect } from 'next/navigation';
|
|
import { USE_BILLING } from '../lib/feature_flags';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export default async function Page() {
|
|
if (!USE_BILLING) {
|
|
redirect('/projects');
|
|
}
|
|
|
|
const customer = await requireBillingCustomer();
|
|
const usage = await getUsage(customer._id);
|
|
return <BillingPage customer={customer} usage={usage} />;
|
|
} |