From 3a3fdd2837d43326bd660d8dc63031ecae0207f9 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Mon, 1 Dec 2025 22:45:54 +0100 Subject: [PATCH] Allow logout from upgrade panel --- apps/main/src/components/UpgradePanel.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/main/src/components/UpgradePanel.tsx b/apps/main/src/components/UpgradePanel.tsx index b315c5f..623076a 100644 --- a/apps/main/src/components/UpgradePanel.tsx +++ b/apps/main/src/components/UpgradePanel.tsx @@ -10,6 +10,7 @@ import { Text } from "@xtablo/ui/components/typography"; import { AlertCircle, CheckCircle2, CreditCard, Loader2Icon, Sparkles } from "lucide-react"; import { useUpgradeBlock } from "../contexts/UpgradeBlockContext"; import { useCreateCheckoutSession } from "../hooks/stripe"; +import { useLogout } from "../hooks/auth"; /** * Blocking upgrade panel that appears when users are past their trial period @@ -18,6 +19,7 @@ import { useCreateCheckoutSession } from "../hooks/stripe"; export function UpgradePanel() { const { isBlocked } = useUpgradeBlock(); const { mutate: createCheckout, isPending: checkoutPending } = useCreateCheckoutSession(); + const { mutate: signOut } = useLogout(); const STANDARD_MONTHLY_PRICE_ID = import.meta.env.VITE_STRIPE_STANDARD_MONTHLY_PRICE_ID || ""; @@ -105,6 +107,13 @@ export function UpgradePanel() { > Contactez-nous + {" | "} + signOut()} + className="text-primary hover:underline cursor-pointer font-medium" + > + Se déconnecter +