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"; export default function Subscribe() { const [submitLoader, setSubmitLoader] = useState(false); 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"); const data = await res.json(); console.log(data); router.push(data.response); } return ( <> Linkwarden

{process.env.NEXT_PUBLIC_TRIAL_PERIOD_DAYS || 14} days free trial, then ${process.env.NEXT_PUBLIC_PRICING}/month afterwards

You will be redirected to Stripe.

Feel free to reach out to us at{" "} support@linkwarden.app {" "} in case of any issues.

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

© {new Date().getFullYear()} Linkwarden. All rights reserved.{" "}

); }