2023-10-16 12:10:52 -05:00
|
|
|
import SettingsLayout from "@/layouts/SettingsLayout";
|
|
|
|
import { useRouter } from "next/router";
|
|
|
|
import { useEffect } from "react";
|
2024-06-04 15:59:49 -05:00
|
|
|
import { useTranslation } from "next-i18next";
|
|
|
|
import getServerSideProps from "@/lib/client/getServerSideProps";
|
2023-10-16 12:10:52 -05:00
|
|
|
|
2023-10-18 23:09:28 -05:00
|
|
|
export default function Billing() {
|
2023-10-16 12:10:52 -05:00
|
|
|
const router = useRouter();
|
2024-06-04 15:59:49 -05:00
|
|
|
const { t } = useTranslation();
|
2023-10-16 12:10:52 -05:00
|
|
|
|
|
|
|
useEffect(() => {
|
2023-11-06 07:25:57 -06:00
|
|
|
if (!process.env.NEXT_PUBLIC_STRIPE) router.push("/settings/profile");
|
2023-10-16 12:10:52 -05:00
|
|
|
}, []);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<SettingsLayout>
|
2024-06-04 15:59:49 -05:00
|
|
|
<p className="capitalize text-3xl font-thin inline">
|
|
|
|
{t("billing_settings")}
|
|
|
|
</p>
|
2023-11-20 11:48:41 -06:00
|
|
|
|
2023-12-01 11:01:56 -06:00
|
|
|
<div className="divider my-3"></div>
|
2023-11-20 11:48:41 -06:00
|
|
|
|
2023-11-10 21:32:56 -06:00
|
|
|
<div className="w-full mx-auto flex flex-col gap-3 justify-between">
|
2023-11-24 07:39:55 -06:00
|
|
|
<p className="text-md">
|
2024-06-04 15:59:49 -05:00
|
|
|
{t("manage_subscription_intro")}{" "}
|
2023-10-18 16:50:55 -05:00
|
|
|
<a
|
|
|
|
href={process.env.NEXT_PUBLIC_STRIPE_BILLING_PORTAL_URL}
|
|
|
|
className="underline"
|
2024-05-24 16:12:47 -05:00
|
|
|
target="_blank"
|
2023-10-18 16:50:55 -05:00
|
|
|
>
|
2024-06-04 15:59:49 -05:00
|
|
|
{t("billing_portal")}
|
2023-10-18 16:50:55 -05:00
|
|
|
</a>
|
|
|
|
.
|
|
|
|
</p>
|
|
|
|
|
2023-11-24 07:39:55 -06:00
|
|
|
<p className="text-md">
|
2024-06-04 15:59:49 -05:00
|
|
|
{t("help_contact_intro")}{" "}
|
2024-05-24 16:12:47 -05:00
|
|
|
<a className="font-semibold" href="mailto:support@linkwarden.app">
|
2023-10-18 16:50:55 -05:00
|
|
|
support@linkwarden.app
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
2023-10-16 12:10:52 -05:00
|
|
|
</SettingsLayout>
|
|
|
|
);
|
|
|
|
}
|
2024-06-04 15:59:49 -05:00
|
|
|
|
|
|
|
export { getServerSideProps };
|