diff --git a/src/routes/painel.faturamento.tsx b/src/routes/painel.faturamento.tsx index cd813f1..acd9f9a 100644 --- a/src/routes/painel.faturamento.tsx +++ b/src/routes/painel.faturamento.tsx @@ -4,7 +4,7 @@ import { useState } from "react"; import { createFileRoute } from "@tanstack/react-router"; import { format } from "date-fns"; import { ptBR } from "date-fns/locale"; -import { CreditCard, ExternalLink, Loader2 } from "lucide-react"; +import { CalendarClock, CreditCard, ExternalLink, Loader2 } from "lucide-react"; import { toast } from "sonner"; import { useSubscription } from "@/hooks/use-profile"; import { useQuery } from "@tanstack/react-query"; @@ -83,7 +83,21 @@ function BillingPage() { : "—" } /> - +
+

Status

+
+

{statusLabel(subscription.status)}

+ {subscription.cancel_at_period_end && + (subscription.status === "active" || subscription.status === "trialing") && ( + + + {subscription.current_period_end + ? `Cancelamento em ${format(new Date(subscription.current_period_end), "d 'de' MMM 'de' yyyy", { locale: ptBR })}` + : "Cancelamento agendado"} + + )} +
+
) : (