import SubmitButton from "@/components/SubmitButton"; import { signOut } from "next-auth/react"; import Image from "next/image"; import { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; import { useSession } from "next-auth/react"; import { useRouter } from "next/router"; import CenteredForm from "@/layouts/CenteredForm"; import { Plan } from "@/types/global"; export default function Subscribe() { const [submitLoader, setSubmitLoader] = useState(false); const [plan, setPlan] = useState(0); const { data, status } = useSession(); const router = useRouter(); async function loginUser() { setSubmitLoader(true); const redirectionToast = toast.loading("Redirecting to Stripe..."); const res = await fetch("/api/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" : "3"} per month

+ VAT if applicable

signOut()} className="w-fit mx-auto cursor-pointer text-gray-500 dark:text-gray-400 font-semibold " > Sign Out
); }