import { signOut, useSession } from "next-auth/react"; import { useState } from "react"; import { toast } from "react-hot-toast"; import { useRouter } from "next/router"; import CenteredForm from "@/layouts/CenteredForm"; import { Plan } from "@/types/global"; import AccentSubmitButton from "@/components/ui/Button"; export default function Subscribe() { const [submitLoader, setSubmitLoader] = useState(false); const session = useSession(); const [plan, setPlan] = useState(1); const router = useRouter(); async function submit() { setSubmitLoader(true); const redirectionToast = toast.loading("Redirecting to Stripe..."); const res = await fetch("/api/v1/payment?plan=" + plan); const data = await res.json(); router.push(data.response); } return (

Subscribe to Linkwarden!

You will be redirected to Stripe, feel free to reach out to us at{" "} support@linkwarden.app {" "} in case of any issue.

25% Off

${plan === Plan.monthly ? "4" : "3"} /mo

Billed {plan === Plan.monthly ? "Monthly" : "Yearly"}

Total

{process.env.NEXT_PUBLIC_TRIAL_PERIOD_DAYS}-day free trial, then $ {plan === Plan.monthly ? "4 per month" : "36 annually"}

+ VAT if applicable

Complete Subscription!
signOut()} className="w-fit mx-auto cursor-pointer text-neutral font-semibold " > Sign Out
); }