Improved the screen for when a user's subscription has expired, or their account was disabled

This commit is contained in:
Tiago Ribeiro
2023-10-12 20:51:09 +01:00
parent da135d3e6f
commit 320aedefb1

View File

@@ -19,6 +19,7 @@ import {calculateAverageLevel} from "@/utils/score";
import axios from "axios";
import DemographicInformationInput from "@/components/DemographicInformationInput";
import moment from "moment";
import Link from "next/link";
export const getServerSideProps = withIronSessionSsr(({req, res}) => {
const user = req.session.user;
@@ -74,7 +75,32 @@ export default function Home() {
<link rel="icon" href="/favicon.ico" />
</Head>
<Layout user={user} navDisabled>
<div className="flex flex-col items-center justify-center text-center"></div>
<div className="flex flex-col items-center justify-center text-center w-full gap-4">
{user.isDisabled ? (
<>
<span className="font-bold text-lg">Your account has been disabled!</span>
<span>Please contact an administrator if you believe this to be a mistake.</span>
</>
) : (
<>
<span className="font-bold text-lg">Your subscription has expired!</span>
<div className="flex flex-col items-center">
<span>
Please purchase a new time pack{" "}
<Link
className="font-bold text-mti-purple-light underline hover:text-mti-purple-dark transition ease-in-out duration-300"
href="https://encoach.com/join">
here
</Link>
.
</span>
<span className="max-w-md">
If you are not the one in charge of your subscription, please contact the one responsible to extend it.
</span>
</div>
</>
)}
</div>
</Layout>
</>
);