Allow logout from upgrade panel
This commit is contained in:
parent
ce11d37a9d
commit
3a3fdd2837
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
</a>
|
||||
{" | "}
|
||||
<a
|
||||
onClick={() => signOut()}
|
||||
className="text-primary hover:underline cursor-pointer font-medium"
|
||||
>
|
||||
Se déconnecter
|
||||
</a>
|
||||
</Text>
|
||||
</div>
|
||||
</CardContent>
|
||||
|
|
|
|||
Loading…
Reference in a new issue