import { SubscriptionStatus } from "@prisma/client";
import usePaymentsHistory from "~/features/settings/hooks/use-payments-history";
import SettingsSection from "~/features/settings/components/settings-section";
import BillingHistory from "~/features/settings/components/billing/billing-history";
import Divider from "~/features/settings/components/divider";
import Plans from "~/features/settings/components/billing/plans";
import PaddleLink from "~/features/settings/components/billing/paddle-link";
function useSubscription() {
return {
subscription: null as any,
cancelSubscription: () => void 0,
updatePaymentMethod: () => void 0,
};
}
function Billing() {
const { count: paymentsCount } = usePaymentsHistory();
const { subscription, cancelSubscription, updatePaymentMethod } = useSubscription();
return (
<>
{subscription ? (
Your {plansName[subscription.paddlePlanId]?.toLowerCase()} subscription is cancelled and
will expire on {subscription.cancellationEffectiveDate!.toLocaleDateString()}.
Current plan: {subscription.paddlePlanId}
Prices include all applicable sales taxes.
> ); } const plansName: Record